On workin with my django project, I learnt new things like how to link template to view directly and using forms and using html the right way.
All you need to link a view from template is just pass the view in your action or link. For eg. I have a view called customer and i wish it to be called dierectly through my homepage.
In my homepage, I have a button named as add customer, and the code can be given as:
Add Customer
where customer is the name of a view in my views.py file
The other thing I want to share is to print a homepage, we need to write a seperate view. All we need is to import the generic views from django in urls.py
Example, I want to display a homepage having the name hpage.html, Edit the urls.py file as:
from django.views.generic.simple import direct_to_template
...
urlpatterns = patterns('',
url(r'^$', direct_to_template, {'template': hpage.html}),
...
)