How to customize Django Admin site by itself ?

Hello Developers✌,
In this tutorial you are going to learn how you can customize Django Admin site by itself.

First install 3rd party package called django-admin-interface

pip install django-admin-interface

Add package to installed apps in se…

Hello Developers✌,
In this tutorial you are going to learn how you can customize Django Admin site by itself.

First install 3rd party package called django-admin-interface

pip install django-admin-interface

Add package to installed apps in settings.py file.

# project/settings.py

INSTALLED_APPS = [
    # Add package before the django.contrib.admin
    'admin_interface',
    'colorfield',

    # django apps
    'django.contrib.admin',
    ...
]

Add following at bottom of settings.py file.

X_FRAME_OPTIONS = "SAMEORIGIN"
SILENCED_SYSTEM_CHECKS = ["security.W019"]

Run migrate to apply migrations.

py manage.py migrate

then collect the static files.

py manage.py collectstatic

If you do not have configured static settings then update your settings.py file like following.

STATIC_URL = '/static/'
STATICFILES_DIRS = (str(BASE_DIR.joinpath('static')),)
STATIC_ROOT = str(BASE_DIR.joinpath('staticfiles'))
STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
]

then run the server.

py manage.py runserver

Go to localhost:8000/admin

Click on the themes model.

Themes

click on the django entry to update the admin interface.

change the entry django

You will see there are so many options to update the UI.

Change the colors, title, logo, etc. as you like.


Print Share Comment Cite Upload Translate
APA
Vijay Soni | Sciencx (2024-03-29T08:00:39+00:00) » How to customize Django Admin site by itself ?. Retrieved from https://www.scien.cx/2022/07/10/how-to-customize-django-admin-site-by-itself/.
MLA
" » How to customize Django Admin site by itself ?." Vijay Soni | Sciencx - Sunday July 10, 2022, https://www.scien.cx/2022/07/10/how-to-customize-django-admin-site-by-itself/
HARVARD
Vijay Soni | Sciencx Sunday July 10, 2022 » How to customize Django Admin site by itself ?., viewed 2024-03-29T08:00:39+00:00,<https://www.scien.cx/2022/07/10/how-to-customize-django-admin-site-by-itself/>
VANCOUVER
Vijay Soni | Sciencx - » How to customize Django Admin site by itself ?. [Internet]. [Accessed 2024-03-29T08:00:39+00:00]. Available from: https://www.scien.cx/2022/07/10/how-to-customize-django-admin-site-by-itself/
CHICAGO
" » How to customize Django Admin site by itself ?." Vijay Soni | Sciencx - Accessed 2024-03-29T08:00:39+00:00. https://www.scien.cx/2022/07/10/how-to-customize-django-admin-site-by-itself/
IEEE
" » How to customize Django Admin site by itself ?." Vijay Soni | Sciencx [Online]. Available: https://www.scien.cx/2022/07/10/how-to-customize-django-admin-site-by-itself/. [Accessed: 2024-03-29T08:00:39+00:00]
rf:citation
» How to customize Django Admin site by itself ? | Vijay Soni | Sciencx | https://www.scien.cx/2022/07/10/how-to-customize-django-admin-site-by-itself/ | 2024-03-29T08:00:39+00:00
https://github.com/addpipe/simple-recorderjs-demo