Customizing default admin settings
Django apps as well as third-party apps come with their own administration settings; however, there is a mechanism to switch these settings off and use your own better administration settings. In this recipe, you will learn how to exchange the administration settings for the django.contrib.auth
app with custom administration settings.
Getting ready
Create a custom_admin
app and put this app under INSTALLED_APPS
in the settings.
How to do it...
Insert the following content in the new admin.py
file in the custom_admin
app:
# custom_admin/admin.py # -*- coding: UTF-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.contrib.auth.admin import UserAdmin, GroupAdmin from django.contrib.auth.admin ...
Get Web Development with Django Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.