Quickstart quide how to get Unfold run in your project

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.

Full documentation is available on GitHub arrow_right_alt

pip install django-unfold
poetry add django-unfold

Adding Unfold into INSTALLED_APPS

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",
]

Configuring URL paths for 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),
]

Adjusting existing model admins

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

Let's work together

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.

  • verified Save time and focus on what matters: building product
  • verified Get instant access to the know-how pool and experience
  • verified Supercharge your development processes and quality of application
  • verified Incorporate custom Django applications into Unfold

* The cost of service starts from €375 EUR.

© 2024 Created by unfoldadmin.com. All rights reserved.