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…


This content originally appeared on DEV Community and was authored by Vijay Soni

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.


This content originally appeared on DEV Community and was authored by Vijay Soni


Print Share Comment Cite Upload Translate Updates
APA

Vijay Soni | Sciencx (2022-07-10T09:44:32+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 ,<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 ]. 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 . 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: ]
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/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.