Overriding Django Admin Homepage? - Django

I am trying to add features to the Django 1.2 home page .

I played with index.html, but functions added to this page affect all application pages.


Any ideas on which template should I use?

Thank!!!

+3
source share
3 answers

You can use a template hierarchy, for example:

index.html

...
{% block content%}
...
{% block mycontent%} My custom text {% endblock%}
...
{% endblock%}

app_index.html

...
    {% block mycontent%} {% endblock%}
..
+4
source

, admin/index.html. admin/base_site.html ( , ).

django/contrib/admin/templates/admin Django.

: , . . , , - , , HTML admin/index.html. , Django - - 1.0.

Screenshot of customized admin page

+3

Source: https://habr.com/ru/post/1746845/


All Articles