admin extension not being loaded

9 views
Skip to first unread message

kcstrom

unread,
Sep 17, 2011, 1:22:05 PM9/17/11
to django...@googlegroups.com
I know I have to be missing something simple  - I've followed the instructions at this doc and have tried extending several different files from the admin site.  I've placed an index.html in the <path to template dir>/admin/<name of my app>/ directory and tried to override the side bar like:

{% extends "admin/index.html" %}

{% block sidebar %}
<h1>This is a test in index.</h1>
{% endblock %}

<path to template dir> is the absolute path I've given via TEMPLATE_DIRS in settings.py.

If I move my index.html to <path to template dir>/admin/ and remove the first line I see the h1 (and only that) that I have in my version of the file indicating that it is overriding the admin/index.html there.  <name of my app> is the same exact thing that I gave to 'manage.py startapp'.

Any idea what I'm doing wrong?  I am super-frustrated at this point because it seems like it should be so easy but it's not working at all.

Thanks in advance.

kcstrom

unread,
Sep 17, 2011, 10:42:08 PM9/17/11
to django...@googlegroups.com
It looks like index.html cannot be overridden per app, only per site.  From the above link:

"

Not every template in contrib/admin/templates/admin may be overridden per app or per model. The following can:

  • app_index.html
  • change_form.html
  • change_list.html
  • delete_confirmation.html
  • object_history.html
"

Reply all
Reply to author
Forward
0 new messages