DEV Community

Cover image for Customizable Django Admin themes
Arpit
Arpit

Posted on • Updated on

Customizable Django Admin themes

Create django project and then create super user to access django admin.

python manage.py createsuperuser
Enter fullscreen mode Exit fullscreen mode

Now django-admin-interface package. django-admin-interface is a modern responsive flat admin interface customizable by the admin itself.

pip install django-admin-interface
Enter fullscreen mode Exit fullscreen mode

After installation, add "admin_interface", "colorfield" in INSTALLED_APPS in settings.py

# settings.py

    INSTALLED_APPS = [

    "admin_interface", #this
    "colorfield", #this

    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'qrcodeapp',

]

Enter fullscreen mode Exit fullscreen mode

add this if in INSTALLED_APPS

 "flat_responsive", # only if django version < 2.0
 "flat", # only if django version < 1.9
Enter fullscreen mode Exit fullscreen mode

Now migrate

python manage.py migrate
Enter fullscreen mode Exit fullscreen mode

This package ships with optional themes as fixtures, they can be installed using the loaddata admin command. Optional themes are activated on installation.

DJANGO THEME (DEFAULT):

python manage.py loaddata admin_interface_theme_django.json
Enter fullscreen mode Exit fullscreen mode

BOOTSTRAP THEME:

python manage.py loaddata admin_interface_theme_bootstrap.json
Enter fullscreen mode Exit fullscreen mode

FOUNDATION THEME:

python manage.py loaddata admin_interface_theme_foundation.json
Enter fullscreen mode Exit fullscreen mode

U.S. WEB DESIGN STANDARDS THEME:

python manage.py loaddata admin_interface_theme_uswds.json
Enter fullscreen mode Exit fullscreen mode

Now run the server and hit http://127.0.0.1:8000/admin and now login yourself.

You can see themes get added

django admin

django admin

django admin

Package: django-admin-interface

Follow me for more <3

Happy Coding :)

You can support me and
Buy Me a Coffee at ko-fi.com

Oldest comments (0)