Overview
Unfold Django Admin Theme is a theme for Django admin that incorporates common practices for building comprehensive admin areas. It is designed to work seamlessly with the default administration provided by Django.
Features
- Visual: Provides a new user interface based on the Tailwind CSS framework.
- Sidebar: Simplifies the definition of custom sidebar navigation with icons.
- Dark mode: Supports both light and dark mode versions.
- Configuration: Most basic options can be changed in the
settings.py
. - Dependencies: Completely based on
django.contrib.admin
. - Actions: Multiple ways to define actions within different parts of the admin.
- WYSIWYG: Built-in support for WYSIWYG (Trix).
- Custom filters: Widgets for filtering number and datetime values.
- Dashboard: Custom components for rapid dashboard development.
- Tabs: Define custom tab navigations for models.
- Colors: Possibility to override default color scheme.
- Third-party packages: Default support for multiple popular applications.
- Environment label: Distinguish between environments by displaying a label.
Installation
The installation process for the Unfold Django Admin Theme is minimal. All that is required is to add the new application at the beginning of INSTALLED_APPS
. There are no changes required for the default admin configuration in urls.py
.
To install, use the following command:
pip install unfold-admin
or with Poetry:
poetry add unfold-admin
After installation, it is necessary for admin classes to inherit from the custom ModelAdmin
available in unfold.admin
.
Please note that admin models coming from third-party packages may not work properly with Unfold by default. This is because these models are registered using django.contrib.admin.ModelAdmin
instead of unfold.admin.ModelAdmin
. To solve this issue, the model needs to be unregistered and then registered again using unfold.admin.ModelAdmin
.
Summary
Unfold Django Admin Theme is a powerful theme for Django admin that offers a new user interface, custom sidebar navigation, dark mode support, and many other useful features. It can be easily installed and configured to enhance the admin experience for Django projects.