Django Admin - change header 'Django administration' text

后端 未结 18 2302
眼角桃花
眼角桃花 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:44

    You can use these following lines in your main urls.py

    you can add the text in the quotes to be displayed

    To replace the text Django admin use admin.site.site_header = ""

    To replace the text Site Administration use admin.site.site_title = ""

    To replace the site name you can use admin.site.index_title = ""

    To replace the url of the view site button you can use admin.site.site_url = ""

提交回复
热议问题