Book Image

Learning Website Development with Django

Book Image

Learning Website Development with Django

Overview of this book

Table of Contents (18 chapters)
Learning Website Development with Django
Credits
About the Author
About the Reviewers
Preface
Index

Customizing the Administration Interface


The administration interface provided by Django is very powerful and flexible. Activating it only takes a couple of minutes, and this will give you a fully featured administration kit for your site. Although the administration application should be sufficient for most needs, Django offers several ways to customize and enhance it. In addition to specifying which models are available in the administration interface, you can also specify how listing pages are presented, and even override the templates used to render the administration pages. So let's learn about these features.

Customizing Listing Pages

As we saw in the previous section, we defined an empty class called Admin in models.py to mark them as available to the administration interface. This class is also useful in customizing several aspects of the administration pages.

Let's learn about this by example. The listing page of bookmarks displays the string representation of each bookmark, as we...