1

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 showing 1

I want to change the default Django logo.

2

Is there any way to accomplish this?

2 Answers 2

0

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

1
  • Well i tried that but my colors from django_interface were lost now my colors are default wich is blue and my client want both the logo and the colors.
    – Javierhfa
    Commented Mar 27, 2021 at 16:53
0

I faced the same problem then what I found is the django-admin-interface makes a directory in the project folder where the manage.py is residing "admin-interface/logo/{your image name}" and the logo is being fetched from there. In my case, the name of the image was aqman.png so the path was "http://127.0.0.1:8000/admin-interface/logo/aqman.png" but django was not letting the media to be accessed this way so I had to modify the url patterns in the settings.py file. The correction led to access the media files through URL,

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = patterns('',
    # ... the rest of your URLconf goes here ...
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.