Custom logo in django jet

Viewed 3828

I am currently trying to do some customization to the skin of the django admin panel, to make it more in line with our brand. Currently we use django-jet to spruce up the admin panel. Are custom css/html possible with django-jet? All of the comments say that I should change some html files, but I think those files are hidden from my project because django-jet takes care of them? If anyone could point me in the right direction it would be appreciated.

Thank you

3 Answers
#in admin.py file
from django.utils.html import format_html

logo_url= "https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.png?v=9c558ec15d8a"
admin.site.site_header = format_html("`<img src={url} height=50 width=50`>", url=logo_url)

Create a admin directory at templates Folder then Create Html File and name it base_site.html . Add Following Content to it .

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

{% block branding %}
<h1 id="site-name">
    <a href="{% url 'admin:index' %}">
        <img src="{% static 'img/my-logo.png' %}" alt="My Company"/>
    </a>
</h1>
{% endblock %}

That's All you are done with custom logo.

Related