- Create a directory named "static" inside your Django app's main directory.
- Inside the "static" directory, create another directory named "admin".
- Place your favicon file (e.g., favicon.ico) inside the "admin" directory.
- Create a file named "base.html" inside the "templates/admin" directory if it doesn't exist.
- Add the following code to the "base.html" file:
{% load static %}
{% block extrahead %}
<link rel="icon" type="image/x-icon" href="{% static 'admin/favicon.ico' %}" />
{% endblock %}
- Save the changes and restart your Django server.