Django Admin - change header 'Django administration' text

后端 未结 18 2348
眼角桃花
眼角桃花 2020-11-28 01:14

How does one change the \'Django administration\' text in the django admin header?

It doesn\'t seem to be covered in the \"Customizing the admin\" documentation.

18条回答
  •  囚心锁ツ
    2020-11-28 01:32

    A simple complete solution in Django 1.8.3 based on answers in this question.

    In settings.py add:

    ADMIN_SITE_HEADER = "My shiny new administration"
    

    In urls.py add:

    from django.conf import settings
    admin.site.site_header = settings.ADMIN_SITE_HEADER
    

提交回复
热议问题