Sorry, my stupid mystake. I've copied bat templates from old Django
1.0 version.

On 7. Dec., 08:50 h., gentlestone <tibor.b...@hotmail.com> wrote:
> I did not make any changes, just copied the original template to
> template/admin
>
> I tried to copy the tepmplate to root (templates/admin) for every app
> and model
>
> and also I tried copy the template to some app and model - the same
> result
>
> Because it didn't work, I put the line:
>
> <link rel="stylesheet" type="text/css" href="{% load adminmedia %}{%
> admin_media_prefix %}css/base.css" />
>
> into base.html. After this (bug?) fixing everything works fine. But
> the bad feeling remains. Here is a beginning of base.html after my
> correction
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml"; lang="{{ LANGUAGE_CODE }}"
> xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif
> %}>
> <head>
> <title>{% block title %}{% endblock %}</title>
> <link rel="stylesheet" type="text/css" href="{% load adminmedia %}{%
> admin_media_prefix %}css/base.css" />
> <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{%
> load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" /
>
> {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{%
> block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock
> %}" />{% endif %}
>
> On 5. Dec., 05:21 h., Sam Lai <samuel....@gmail.com> wrote:
>
> > 2009/12/4gentlestone<tibor.b...@hotmail.com>:
>
> > > I've tried to folow the tutorial and customize the admin template and
> > > made a copy of 'change_form.html' template into the 'templates/admin'
> > > directory in my project. I also set the
> > > TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__),
> > > 'templates').replace('\\','/'),
>
> > > After this, the result is BAD. In the result admin page source code,
> > > the line
>
> > > <link rel="stylesheet" type="text/css" href="/media/css/base.css" />
>
> > > is missing. I recognized the change_form.html rewrites the stylesheet
> > > block:
>
> > > {% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock
> > > %}
>
> > > so I know why, but the original non-copy version of change_form.html
> > > is the SAME! How can it works in the original? I am totally confused.
>
> > > What am I doing wrong? Some setting is missing?
>
> > Are you trying to override the admin template for every app and model?
> > Or only for a specific app or model?
>
> > What changes have you made in your own templates/admin/change_form.html?

--

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=en.


Reply via email to