Search code examples
djangodjango-admindjango-staticfiles

django how to replace the logo title of 'django administrator'


my purpose is to remove the title of "Django administration" with yellow color in every admin page like the following screen, please help. thanks.

enter image description here


Solution

  • Copy the default template named base_site.html to your template directory. you can find the default template path by running the command:

    python -c "import django,os; print(os.path.join(django.__path__[0], 'contrib/admin/templates/admin/base_site.html'))"
    

    If your template directory named "templates", you should copy base_site.html to templates/admin/base_site.html

    Then edit the file and replace {{ site_header|default:_('Django administration') }}

    See the document https://docs.djangoproject.com/en/1.11/intro/tutorial07/#customizing-your-project-s-templates