Book Image

Django 1.0 Template Development

Book Image

Django 1.0 Template Development

Overview of this book

Table of Contents (17 chapters)
Django 1.0 Template Development
Credits
About the Author
About the Reviewers
Preface
Index

Customizing the admin color scheme


If you 've ever looked at the admin page with CSS turned off, you'll know that it owes most of its beauty to the CSS stylesheets it ships with. Here's what it looks like without the styles applied:

Rather than trying to edit the stylesheets directly, we'll just redefine the specific styles needed to apply our color scheme. We only need to override the specific properties we want to change, such as the font or the background color.

Identifying styles to change

The admin stylesheets are found in django/contrib/admin/media/css, but we don't need to copy them anywhere to make our changes. We just need to identify the selectors we'd like to override. We can do that by viewing the source on the rendered admin pages and seeing what the IDs and class attributes are applied to the content we want to change.

Note

You can also use third-party tools to identify the CSS that is applied to elements on the page. Freely available tools such as Firebug and the Web Developer...