On Tue, Nov 17, 2009 at 1:48 PM, Zeynel <azeyn...@gmail.com> wrote: > This worked, thanks. > > But I had to change base.html as well (in ~/webapps/django/sw1/ > templates/admin). Because previously I had hardcoded the {{ title }} > in line 65 in base.html > > {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %} > {% endblock %} > > I would like to ask, if you can help me understand how this line 65 > gets the document title and if I can change the document title. > Because I prefer that {{ title }} remains there. > > The value of title is set by the admin view code that renders admin templates. Note many different admin templates inherit from the base admin template, so there are many different places where the title value is set. Search for 'title': on this page, for example:
http://code.djangoproject.com/browser/django/tags/releases/1.1.1/django/contrib/admin/sites.py and you will see how it is set differently for a few different admin views (and there are others in other files). Thus there is no knob or configuration option to change the value of title that is passed into the templates. What there is is the ability to override templates, and specifically override the content of the content_title block. Karen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=.