Luckily for those who want to quickly create a fully-operational app with Django, the framework comes with a built-in admin interface for CRUD operations, handling forms, authenticating users, and performing other common tasks that everyone expects from a back-office tool.
Because of its simplicity and quick installation, Django Admin is a popular and widely used solution for shipping internal tools together with new applications. However, once the application grows, Django Admin can be too limited and its performance tends to decline. The good news is there are various ways to build an admin panel for a Django app. In this article, we’ll compare different options, such as:
- Building internal tools from scratch,
- Django Admin, and its alternatives,
- Low-code solutions like Retool and Forest Admin.
And finally, we will show you how to build a Django admin panel with Forest Admin.
Let’s dive in!
How to build a Django admin panel
Since we’ve already mentioned Django Admin, let’s start with this one. Django Admin is an automatically generated open-source API-based solution that reads metadata from the models to provide a quick model-centered interface to manage users and content on the site. Typically, it is the first choice of Django developers whose task is to add an admin panel to the application they built. After all, it’s quick and it fits the essential needs of teams dealing with users and content.
However, when your app has the potential for growth or if it is already growing, Django Admin is typically not enough. At Forest Admin, we’ve talked to numerous developers who were initially happy with Django Admin but once their product became bigger and more complex, Django Admin’s performance descreased, and business team members started complaining about its UX and design. The second issue can be tackled by customizing an admin panel with HTML & CSS, using an admin panel template, or packages like Django Jazzmin. However, this requires quite a lot of additional work.
When apps become more complex and/or used by a growing number of users, many developers are tempted to build an admin panel on their own. Let’s have a quick look at the pros and cons of such a solution.
Building a Django admin panel from scratch
This option gives you maximum flexibility. You can design an admin panel exactly the way you want to, and make it match even the most specific business workflows. However, you need to take into account that:
It usually means reinventing the wheel, as 80% of the features needed in an admin panel are generic. Every admin panel needs CRUD operations, search, filters, permissions management, dashboards, etc. At the same time, all these features can be time-consuming to build and maintain, especially when business teams ask for changes and improvements.
In-house built admin panels quite often have poor UX/UI which makes a significant impact on the productivity of people who use them on daily basis. An alternative? Engaging Product, UX, and Design teams, and spending a lot of time on building and maintaining the back-office. The time and resources that could be spent on a customer-facing app.
Low-code admin panel solutions
If you still find building back-office tools from scratch tempting, we recommend reviewing low-code internal tool solutions. They marry the effectiveness of templates and SaaS solutions with customization opportunities that used to belong to custom-made internal tools. As I already mentioned above, 80% of features users expect from an admin panel are generic. What about the remaining 20%? You won’t be able to create them with simple templates, but you can with low-code solutions.
Forest Admin and Retool are one of the most popular ones. The biggest difference between them is that Retool’s focus is mostly on the UI and it can connect directly to the data sources. However, although connecting Retool to your API is quick, it later requires mapping your back office according to what you need to achieve. Forest Admin populates the UI with your data out-of-the-box.
Forest Admin is also perfectly scalable, so you don’t need to worry about what happens when your project gets traction and you need to onboard even thousands of new users quickly.
How to build a Django admin panel with Forest Admin
To get started, create a free account at ForestAdmin.com. Name your project, and choose Django from the list of databases and data sources.
Then follow the 6 quick steps from the onboarding instructions. You will be able to copy and paste the code when you log in to the app.
If you need any assistance, Forest Admin developer community forum is there to help.
Forest Admin populates the UI with the data from your database. CRUD, search & filters, roles & permissions, table and summary views, export, and much more features are available out-of-the-box.
Now it’s time to customize your new back-office tool!
Activate your layout editor, and collection settings to rearrange, rename, and/or sort your collection’s data.
For more customization ideas in the drag-and-drop UI, check Forest Admin User Guide.
What if your workflows are more complex and can’t be built using a layout editor? Forest Admin was built in a way that lets you fully customize your admin panel. You have full control over your data and your business logic. Do you need the map view instead of the table view? It’s easy to build with Forest Admin Smart Views.
Or maybe your team is responsible for validating documents or just approving/rejecting content on the website? Such functionality can be easily built with Moderation Views.
These are just a few examples of how to customize your Forest Admin. Find more advanced functionalities in our Developer Guide.
Once your new Django admin panel looks and works exactly like you want it to, it’s time to invite team members, and control which users have access to specific resources, using Roles, Teams, and Scopes.
Are you ready to equip your team with a fully-functional custom back-office tool without spending hours on designing, building, and maintaining it? Create your free account now.
You can also read a detailed comparison between Forest Admin and Django Admin.