1👍
✅
I think you need Template context processors.
Here is a nice tutorial by James Bennett on that:
http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/
1👍
Well, I’m very new to django, and maybe I’m wrong, but I think you are looking for something like caching. Read the docs, and decide whether is it fits you or not.
1👍
You can cache just a part of your view:
https://docs.djangoproject.com/en/1.3/topics/cache/#template-fragment-caching
surround your navigation bar like this:
{% cache 500 navbar %}
... put your navbar code
{% endcache %}
and ensure to have
{% load cache %}
at the top of your template or the base template.
- [Django]-Tastypie-nonrel, django, mongodb: too many nestings
- [Django]-How to get form field value before passing the form validation?
- [Django]-Config Django 1.5.1 for aptana studio 3
Source:stackexchange.com