简体   繁体   中英

Logo doesn't display using Django admin_interface

I have django-admin-interface installed in my django app. The problem is that when I try to upload a logo it says that all is okay but the logo doesn't show.

Logo uploaded correctly but not showing1

I want to change the default Django logo.

2

Is there any way to accomplish this?

Create a new template and extends the 'admin' template like below to override the default admin template.

{% extends "admin/base.html" %}
{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">MY_LOGO_OR_TEXT</a></h1>
{% endblock %}

In the code above, change the MY_LOGO_OR_TEXT section with your html logo or just text to be shown on the admin panel like you wanted.

ADMIN

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM