Custom django admin template for app

I would like to create my own index.html derived from admin / index.html for each application in my django project.

For example, my folder structure is similar:

  • app1
    • Patterns
      • index.html (differs from the global admin / index.html template)
  • app2
  • Patterns
    • admin
      • base.html
      • index.html (global index.html template)

How can I get custom index.html files for my applications that django recognizes? At the moment, only index.html in the global template / admin folder is considered for displaying index pages in my backend.

I am using django 1.6

+4
source share
1 answer

, - Django , :

contrib/admin/templates/admin . :

  • app_index.html
  • change_form.html
  • change_list.html
  • delete_confirmation.html
  • object_history.html

, - , , .

, - - - , , , , , , .

+4

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


All Articles