How to Build a Django-Unfold Admin Dashboard
Step-by-step guide to building a Django-Unfold admin dashboard with custom models, filters, actions, and KPIs.
Django-Unfold's dashboard needs no introduction. Developers tired of default Django admin skin find it's a modern, responsive, customizable admin interface built on Django's admin framework that replaces stock look with a clean side-bar-driven layout feeling like a proper SaaS panel. And this article walks through the actual steps to set it up, configure the navigation, and make it your own.
What Django-Unfold Brings to the Table
It's a 2010s feel. But Unfold gives you a fresh UI without rewriting your models or views because it works with standard ModelAdmin classes, so you keep your existing logic. The package adds collapsible sidebars, dark mode support, and custom theming through a simple configuration file, and it also integrates with Django's built-in permissions system, meaning you don't need to re-architect your authentication flow.
For teams already using Django, the appeal is speed. You drop in the theme, adjust a few settings, and your admin panel looks like a modern application. No JavaScript framework required. No front-end build pipeline. The changes are purely on the template and CSS layer, which means your development velocity stays high.
The Installation Process
Start by installing the package with pip. The official name is django-unfold. Add it to your INSTALLED_APPS before django.contrib.admin. Then run collectstatic to copy the new assets. That is the baseline. The project’s documentation recommends checking for any static file conflicts if you have a custom static setup.
“We designed Unfold to be as close to a drop-in replacement as possible. You keep your admin.py files unchanged. The theme picks up your registered models automatically.” , from the Django-Unfold documentation
After installation, you will notice the login page and the main dashboard look different immediately. The sidebar appears on the left with a collapsible menu that respects your admin.py registrations. You can also group models into sections by using the UnfoldAdminNavigationMixin or by defining a custom NAVIGATION list in your settings.py.
Configuring the Navigation and Sidebar
The real power of a Django-Unfold admin dashboard comes from the navigation configuration. You have two ways to organize your admin links.

- Automatic rendering: The default behavior reads your registered models and displays them in the sidebar alphabetically. This works for small projects with few models.
- Manual grouping: You can define a
UNFOLDdictionary in yoursettings.pywith aSIDEBARkey. Inside that key you specify groups and items. Each item takes atitleand alinkpointing to an admin URL likeadmin:app_model_changelist.
The press release skipped this. But if you're using custom views not registered through ModelAdmin, you can manually add them to the sidebar by providing the URL name, making it useful for hybrid applications with standard Django admin and custom dashboard view.
Dark Mode and Theming
Users can switch per session. Unfold comes with a built-in dark mode toggle that you enable by adding "DARK_MODE": True to the UNFOLD settings, and the toggle's in the sidebar footer. But for theming, you can override CSS variables in a custom stylesheet, and they follow a naming pattern like --primary-color and --sidebar-bg, so the documentation provides the full list.
But there's a catch. If you override too many variables, you might lose consistency across different admin pages, so the recommended approach is to start with the defaults and change only two or three top-level colors. That keeps the design coherent while still letting your brand show through.
Customizing the Dashboard Page
It's a simple index page. Unfold replaces that simple index page showing your registered models with a more visually organized grid, and you can further customize it by adding a custom template for the index.html using the admin/index.html override pattern. Unfold respects Django’s template inheritance, so your custom content appears inside the Unfold shell.
Unfold doesn't provide summary cards out of the box for total users, recent orders, or pending tasks, though developers often drop them in. You can render them. Using standard Django template tags and context variables, you just need to add a custom view that returns dashboard data and include it in the index template.
The numbers tell a different story if you rely solely on the built-in admin. Without Unfold, you'd have to build a separate front-end application just to get a modern dashboard, but with Unfold you stay within Django's ecosystem, which cuts development time significantly.
Common Pitfalls and How to Avoid Them
After installing, it's often skipped. Without that step, the CSS and JS files are missing, admin falls back to the default Django template, so always check that static files are served correctly, especially with a CDN or different storage backend.
Another issue arises with third-party admin packages, and although Unfold works well with django-import-export and django-admin-sortable2, you'll need to test compatibility because the maintainers list known integrations in their repository. Rely on a lesser-known library? Test it before deploying.
And this gets interesting. Unfold supports custom actions and filters like the stock admin, and it doesn't break the admin's JavaScript events so actions that trigger modals or confirmation dialogs still work. You can add bulk actions, custom form fields, and inline editing without worry.
Should You Use It for Production?
Yes. For internal tools. And the theme's stable, the community's used it in production for over a year, and though the user base is smaller than the default admin, bug reports are handled quickly. So if you need a public-facing admin, consider whether Unfold's theming flexibility meets your brand guidelines; it's relying on CSS variables so you can achieve a distinct look without modifying source code.
Minimal effort. Django-Unfold admin dashboard gives you modern interface with minimal effort, you keep your existing models and views, you gain a sidebar, dark mode, and theming, and you avoid the complexity of a single-page application framework. But it's a practical choice for teams that want a better admin without a rewrite.
Frequently Asked Questions
What is the Django-Unfold admin dashboard?
It is a modern, responsive, and customizable admin interface built on top of Django's admin framework that replaces the stock look with a clean, side-bar-driven layout.
How do you install Django-Unfold?
Install the package with pip, add 'django-unfold' to INSTALLED_APPS before django.contrib.admin, then run collectstatic to copy the new assets.
How can you configure the sidebar navigation in Django-Unfold?
You can define a UNFOLD dictionary in settings.py with a SIDEBAR key to specify groups and items, or use automatic rendering that displays registered models alphabetically.
Does Django-Unfold support dark mode?
Yes, it has a built-in dark mode toggle enabled by adding 'DARK_MODE': True to the UNFOLD settings, and users can switch per session.
What should you check if your Django-Unfold admin falls back to the default Django template?
You should ensure you ran collectstatic after installing the package, because without that step the CSS and JS files are missing.
💬 Comments (0)
No comments yet. Be the first!













