I'm wondering if I did the right thing, here.  I wanted to replace the
admin/base_site.html template, but only for requests to /myapp/admin/
*, leaving requests to /admin/* alone.

The first thing I tried was a copy/modify of base_site.html to myapp/
templates/admin/myapp/, but the modifications weren't in effect on the
index page -- not the desired outcome.

Then I tried a hack that added myapp's templates directory to
TEMPLATE_DIRS at runtime, which did have the effect I want in /myapp/
admin, but it also overrode the templates on requests to /admin.  Not
the desired outcome.

(After some reading, I believe I understand why I didn't get what I
want on the above two attempts.)

Lastly, I tried creating a AdminSite subclass that pointed to a custom
index page: admin/index_myapp.html, which now extends a custom base-
site template: admin/base_site_myapp.html.  This gives me what I want:
it leaves /admin/ requests alone and overrides the templates for /
myapp/admin/.  It does have the drawback, though, of having to
maintain my own [largely unchanged] copy of the admin-index template,
which means possibly having to keep track of changes to Django's admin-
index template with each new Django release.

Is there a better method for replacing base_site.html on requests to
app-specific urls, that doesn't involve duplicating the index page?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to