The installation process is minimal & straightforward. Everything what is needed is to follow the steps below to change your admin theme.
Before we start make sure django-unfold package from PyPi repository is installed in active environment. You can use pip for getting the package. In case you prefer Poetry it will work as well.
pip install django-unfold
poetry add django-unfold
Add new string value unfold into INSTALLED_APPS in settings.py. It is necessary to have new option before django.contrib.admin to be sure it will be properly loaded, otherwise it is possible to get unexpected errors.
# settings.py INSTALLED_APPS = [ "unfold", "django.contrib.admin", ]
It is important to load admin urls in urls.py. The default configuration available after setting up Django project does not have to be changed. Just make sure admin paths are loaded.
# urls.py from django.contrib import admin from django.urls import path urlpatterns = [ path("admin/", admin.site.urls), ]
In case you have already registered Django admin models through @register decorator, make sure that they are inheriting from unfold.models.ModelAdmin.
# admin.py from django.contrib import admin from unfold.admin import ModelAdmin @admin.register(MyModel) class CustomAdminClass(ModelAdmin): pass
Did you decide to start using Unfold in your application but you need help with integration? Feel free to get in touch for consulting or development services.
* The cost of service starts from €329 EUR.