Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

add favicon in django admin

#If favicon is in /app/static/img/favicon.ico, link it into the 
#{% block extrahead %} of this file: /app/templates/admin/base_site.html
  
{% extends "admin/base.html" %}

    {% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

    {% block extrahead %}
        <link rel="icon" href="{{STATIC_URL}}img/favicon.ico" sizes="48x48" />
    {% endblock %}
    {% block branding %}
        <h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django administration') }}</a></h1>
    {% endblock %}
    
#In settings.py, INSTALLED_APPS be sure your app is listed 
#before django.contrib.admin
Comment

add favicon in django admin


    {% extends "admin/base.html" %}

    {% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

    {% block extrahead %}
        <link rel="icon" href="{{STATIC_URL}}img/favicon.ico" sizes="48x48" />
    {% endblock %}
    {% block branding %}
        <h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django administration') }}</a></h1>
    {% endblock %}

Comment

PREVIOUS NEXT
Code Example
Python :: how to check if given primary key exists in django model 
Python :: pandas dataframe convert yes no to 0 1 
Python :: python type annotations list of possible values 
Python :: python check if string is url 
Python :: pandas fillna 
Python :: bot delete embed py 
Python :: how to round to the nearest tenth in python 
Python :: append more columns into a 2d array 
Python :: convert df.isnull().sum() to dataframe 
Python :: stop word python 
Python :: kmp algorithm 
Python :: how to calculate log 10 in python 
Python :: Difference between append() and extend() method in Python 
Python :: python increment filename by 1 
Python :: how to create a string in python 
Python :: how to append data in excel using python 
Python :: extract address from text python 
Python :: pandas frequency 
Python :: tkinker 
Python :: what is attribute in python 
Python :: mathplolib avec date 
Python :: create frequency tables in pandas 
Python :: log in python 
Python :: k fold CV with xgboost 
Python :: Changing the data type to category 
Python :: Python Pandas export Dataframe to csv File 
Python :: python cant find keras utils to_categorical 
Python :: python code to demonstrate inheritance with animal class 
Python :: what is not equals in python 
Python :: comment transformer un chaine de caractere en liste python 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =