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.

I actually want to make http://swimswith.com/admin/wkw1/ private
because I don't want the reviewers of the demo to see that page. I am
having problems with views as well so I'll ask that in another thread.

Thank you for the help

On Nov 17, 12:45 pm, lzantal <lzan...@gmail.com> wrote:
> Don't copy the original change_list.html file over there.
> Create a new empty change_list.html file and put the code in there I
> posted previusly.
> So your new file will have only 2 lines of code inside.
> What it does is it extends the original template and thanks to django
> blocks you overwrite the title section.
>
> lzantalhttp://twitter.com/lzantal
>
> On Nov 17, 6:46 am, Zeynel <azeyn...@gmail.com> wrote:
>
>
>
> > Ok, thanks. I read the "overriding admin templates" section. I want to
> > learn Django's template system and all these files are confusing to
> > me, but eventually I'll get it.
>
> > As instructed I created the directory system
>
> > ~/webapps/django/sw1/templates/admin/wkw1/lawyer
>
> > Then, I copied change_list.html from
>
> > django/contrib/admin/templates/admin
>
> > and pasted it in
>
> > ~/webapps/django/sw1/templates/admin/wkw1/lawyer
>
> > Then I copied
>
> > {% extends "admin/change_list.html" %}
> > {% block content_title %}<h1>Your Title Here</h1>{% endblock %}
>
> > and pasted on top of change_list.html.
>
> > I restarted the server. But I don't see the change. What am I doing
> > wrong?
>
> > Thanks again for your help.
>
> > On Nov 17, 8:57 am, Karen Tracey <kmtra...@gmail.com> wrote:
>
> > > On Tue, Nov 17, 2009 at 8:46 AM, Zeynel <azeyn...@gmail.com> wrote:
> > > > I am sorry, I am new to django and I don't understand what I need to
> > > > do here.
>
> > > You should read this section in the docs:
>
> > >http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-ad...
>
> > > 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=.


Reply via email to