1

Is there a way to add custom views to the Django admin app?

To be specific, I would like to be able to switch out the "content" div for custom static content, while preserving the "header" and "footer" divs. This is different than redirecting to a static HTML page, which would not preserve the header and footer.

Nathan Katz
  • 739
  • 1
  • 7
  • 12

2 Answers2

2

You just configure your view as usual (urls.py -> myapp.views) and then extend the admin base template:

{% extends "admin/base_site.html" %}
{% block content %}
    My content looking like the rest of the admin app.
{% endblock %}
Danny W. Adair
  • 12,498
  • 4
  • 43
  • 49
0

Here is a small intro http://www.djangobook.com/en/1.0/chapter17/, I think where is new version, but I think where is nothing changed in concept of extending admin pages.

rootart
  • 677
  • 3
  • 5