set favicon in django admin

前端 未结 4 1706
醉酒成梦
醉酒成梦 2021-02-18 14:08

I need to set up a favicon for django admin interface.

It would be best to do it globally, without overriding templates for all apps.

What is the cleanest way

4条回答
  •  独厮守ぢ
    2021-02-18 14:32

    To avoid duplicating anything of the original file, you can actually override the template while extending it (docs). So create your own template/admin/base_site.html:

    {% extends "admin/base_site.html" %}
    {% load static %}
    {% block extrahead %}
        
    {% endblock %}
    

提交回复
热议问题