Re: [mezzanine-users] Where's admin/base.html?

66 views
Skip to first unread message

Stephen McDonald

unread,
Nov 12, 2012, 6:20:19 PM11/12/12
to mezzani...@googlegroups.com
Mezzanine doesn't provide it - either django.contrib.admin or grappelli-safe (if installed, which is by default) will provide it.

https://github.com/stephenmcd/grappelli-safe/blob/master/grappelli_safe/templates/admin/base.html

On Tue, Nov 13, 2012 at 10:16 AM, John Munroe <mun...@gmail.com> wrote:
Hi

I'm looking at the templates in core/templates/admin and in base_site.html, it extends admin/base.html. I can't seem to find it anywhere. Does anyone know where it is?

Thanks!



--
Stephen McDonald
http://jupo.org

John Munroe

unread,
Nov 13, 2012, 9:24:59 AM11/13/12
to mezzani...@googlegroups.com, st...@jupo.org
I see. So how does django know that admin/base.html refers to the one in django.contrib.admin or grappelli-safe rather than one provided by Mezzanine?

Thanks

Josh Cartmell

unread,
Nov 13, 2012, 1:43:58 PM11/13/12
to mezzani...@googlegroups.com
Assuming that you have a standard setup, my understanding is that first it will look in your project's templates directory.  From their it will look through the template directories of any app in INSTALLED_APPS, starting with the first one.  At any point that it finds a matching template it will use it and stop looking.  For a more thorough discussion of that look here:
https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types, specifically at the section about the app_directories loader.
Reply all
Reply to author
Forward
0 new messages