I am using Django1.9 and trying to override the admin interface.
I referenced the following link to override the admin header
http://stackoverflow.com/questions/4938491/django-admin-change-header-django-administration-text
As mentioned in the post, my src-> Templates-> admin-> base_site.html directory / file structure
base_site.html
{% extends "admin/base.html" %} {% block title %}Personal Site{% endblock %} {% block branding %} <h1 id="site-name"><a href="{% url 'admin:index' %}">Control Panel</a></h1> {% endblock %} {% block nav-global %}{% endblock %}
But this page is not called. I copied the code base_site.html from https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/base_site.html
& title changes made.
I know I can configure the admin header in django, but that is not what I am looking for. My long-term goal is to customize the entire admin user interface. So please explain to me how I can get this custom template page to be called.
Here are the settings for my template:
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ os.path.join(BASE_DIR,'templates'), ], 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], 'loaders':[ 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader' ] }, }, ]
Thanks Aniruddha
source share