django override admin template
django
Solution
EDITED PREVIOUS USER RESPONSE -- THIS WORKS:
I think your relative path to the templates directory is wrong.
If you follow these steps it should work: (I tested it myself)
Put the `mytemplates` dir side by side with the `manage.py` file
project
-app1
-app2
-mytemplates
-admin
-base_site.html
-manage.py
Change the TEMPLATE_DIRS to:
TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'mytemplates'),)
Make sure the order of the template loader is:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
Problem
I am following part 2 of the Django tutorial. I am trying to override an admin template (`base_site.html`) I copied the file from the `django/contrib/admin/templates` to `mytemplates/admin/base_site.html` I also updated settings.py: ``` #Base Directory BASE_DIR = os.path.dirname(os.path.abspath(__file__)) #Template directories TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'mytemplates'),) ``` I tried putting the mytemplates folder in the root of the project folder as well as in the mysite folder with no luck. Any pointers would be great!