How can I get a favicon to show up in my django app?

后端 未结 13 1562
盖世英雄少女心
盖世英雄少女心 2020-12-02 06:50

I just want to drop the favicon.ico in my staticfiles directory and then have it show up in my app.

How can I accomplish this?

I ha

13条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 07:50

    Just copy your favicon on: /yourappname/mainapp(ex:core)/static/mainapp(ex:core)/img

    Then go to your mainapp template(ex:base.html) and just copy this, after {% load static %} because you must load first the statics.

    
    

提交回复
热议问题