Is it time for a Django Admin rewrite? If so, how?
Transcript
By Speaker 1, Emma Delescolle, Speaker 3, Speaker 4, Speaker 5. From DjangoCon Europe 2026. Published October 26, 2026.
Watch the video Markdown version 4,653 words · auto-generated · en
Transcript
Automatically transcribed, so expect mistakes in names and technical terms. Filler words are removed.
Speaker 1
Okay, I think we can all agree that the Django admin is something that is rather old by standards from nowadays and stuff got bolted on bolted on all the time and maybe it's time for a complete rewrite. Emma is going to tell us more about this. She's currently a steering council member, hopefully for the next release cycle as well, but we will see about that. Give her a warm welcome.
Emma Delescolle
Hello. So yes, my name is Emma. My main claim to fame right now is being part of the Django Steering Council. I also run a small company in Belgium that's called Lavit. and we do a lot of Django development. I also work with squads which is a grouping of consultants mostly senior consultants and you can hire a team and only pay what you need and I go through them for larger projects And we all love Django. This is why we're here, right? If somebody doesn't love Django, maybe you're in the wrong conference. But I do love Django.
It's a great web framework. The tagline is web framework for perfectionist with deadline. It's 20 years old, almost 21 now. It's got a bunch of features out of the box. A lot of batteries are included. And one of the included batteries is the Django admin. The Django admin is one of the things that when you have never seen it, when you see it for the first time It makes you go whoa this is comes free with Django you get all these features this is great And I mean there is a saying that come to Django for the admin
stay for the community. Have you heard that before? I I've certainly heard it and yes, the admin is one of the many things that drew me to Django. The admin is really good. In only four lines of code you have a full credit interface with authentication, authorization, you have filtering, you have searching, you have Probably for if you're doing some sort of enterprise back office or ERP or well your job 80% is going to be CRUD plus a little something and here you already have the cred
plus search filtering and all that. So yeah, that that that that's great. Now of course the plus in crut plus sometimes You need things that are not native to Django or to the Django admin. But in Django, there are third-party applications. That's that's the secret source of Django. So let's let let's use third party application. You need some drag and drop in a list in the admin There is a package for that. I can see the author of that package i in the front row. So yeah, let's
let's put some heavy cream in ourselves and let's start off source. Then I will also like little stuff like custom actions displayed on each row of the of the admin. That's that's another thing that's got a package and yeah let's Let's put a bit of salt in there. And now I want also to have nested inlines. There's also a third-party app for that. Let's Let's add some garlic in there. And no, I would also like to customize my forms. I would like to my forms to be just two columns, all by forms. I just want them to be two columns. Yeah, let's let's add a bit of lime juice in there.
And yeah, I also want you to customize some of the aspects. So maybe I want some translatable models. Yeah the translatable models I live in Belgium. We have three official languages. So translatable models is something I need. Yeah, let's put some more ingredients in the sauce. Let's add some strawberry jam. If you've ever tried to make yourself something to eat and you've paid attention to all the ingredients that that I've listed right now. You're policing this is all coming apart. This is going to be disgusting. And unfortunately that's that's also what happens when you're trying to add too many third-party
applications to your Django admin. Some will clash with each other, they are not going to be compatible. So you might want to try and do it yourself. and you will be meeting the change list view, the change form view, and those are hard to extend. And there is a reason why they're hard to extend. The truth is that the admin was not really built for Django. Django was built around the admin that was developed as a need for newspaper and the admin predates The admin itself redes most of Django.
Django is 20 years old. The admin is as old as that. And for some reason some people have always had harder time to get into adding features for the for the admin. So the admin is a bit stagnated while Django itself was getting some newer features, some newer practices the admin still was improving but more slowly. The fact is that a lot of the good practices that we use in Python today did not even exist when the Django admin was written. If you think of things like data classes, they did not exist and there is no
not a single data class in the code for the Django admin. Enums. I found one enum in the Django enim code because Well, it was not a tank when the wiki admin was written and you don't you usually don't go through the existing code to rewrite it with new features. You just keep using it until it breaks. Things that you might be more familiar with, like F-strings. Only half of the string manipulation in D Django admin is done with F-strings. And the what we're coming at is that really Django is a framework And the Django admin
is a framework inside the framework that doesn't really work like the rest of the framework. And documenty knows about it. I've talked to several of you. You told me of things that you're trying to do. Last year we launched the new features repo on GitHub. And last time I checked about a third of the new features requests were for the admin. Which when you think that the Yanmin is only a small bit of Django, this is this is huge. I have not followed up but I know that there has been talks of frontend group that wants to reskin
the admin. And there's also on the new features repro issue seventy that's just says free thank the admin. So that's the community knows. And not only the community knows, but the community has been trying to fixed things somehow for the past fifteen years at least. My favorite attempt to of doing that was Django Admin 2, which was based on factories using the Django generic views. Because the admin has all this code to do CRUD, but beside that Django itself has all this code to do
code. There are the list the generic views and so we're maintaining two different versions of that. So Django had me into tried to take advantage of that. And it was a good project. Unfortunately it's been abandoned because the maintainer moved on to something else Then there are tools like Grapelli and Jet. As far as I know, Grapelli is the oldest try at re-implementing the admin somehow. Grappily and Jet are mostly skins or templating over the admin, but they also add a few little bits. Then there are things like Wagtail. Wagtail, which is one of the major CMSs for Django, has its own admin
that is not Django admin. And some pay some people are just taking out the wagtail part out of the wagtail admin and are using the wagtail admin for regular Django projects I have given my own try at this. I have published the RF schema adapter, which lets you use Django Rest framework to build an API and then export that automatically to a JavaScript front end. And I 'm still using that today. It's starting to look a bit dated though But I I'm still using that and it still works great.
And So if we looked at things, I said that's with the Django admin you want to go you go whoa when you see it first. And twenty years ago, Django admin was mostly the only one that was doing that. There was Rails that had a very different approach. Rails uses blueprints and you write there is a lot of code that's automatically generated for you. Django uses inheritance instead and there is no code generated for you. You write all your code. And for about ten years,
those two were your only choices if you wanted something that was quite capable out of the box. But yeah, then other frameworks got up. And starting five years ago, not only have other frameworks caught up, but they started shipping with things that are not part of Django. Not part of Django, I mean you have things like live wire or turbo. that adds some dynamic features to the admin interface of Laravel and Rails There is HTMX, there is filmed, there is all that. And there are some packages for Django that are trying to bring those to Django
I mentioned the Wagtail admin, there's also Jet. They all bring in a beautiful UI, but they also add a few tools to make the admin more polished. And one thing about those tools is also that they are very opinionated. Django used to be more opinionated than it is now. And these tools somehow are trying to put that back. So what does the future look like for a Django admin? Well we can look around and see what the others do. We can also see what they don't do well and try to do better. And my take on it is that
an admin should be extendable, composable. Django native and pluggable. But most importantly The admin should be Django and just Django. It should not be something else that you have to learn on top of Django. And if you write something for your admin, you should be able to at some point say, oh, I don't want this in the admin after well, I want it outside of the admin and just move it out and use it outside of the admin. So what if your admin was just Django code? There's a lot of things that we can use directly in Django. I mentioned there's generic fields that do
a lot of what you want to do when you do CRUD. There is the generic list view, there's the generic update view, the generic delete view and the generic create view. So that's that's all cred and we have that. But I also want Things to be composable, not only views, but also things like permissions and things like that. We just had a talk about authorization for very complex cases, and we have solutions for that. But there's also a lot of more simple cases that Django does not provide things for. There are other packages in Django that provide that. Django Rest framework, for example, has these permission classes that are authenticated
Write access and read-only to everybody. That's that's just one example. And to avoid the clash when you're trying to compose something right now, as we mentioned, when you're trying to add too many third-party applications. The admin was not really built at the start to accept to have third-party packages. It's something that has been crafting itself onto it. There's a lot of those packages that need to override things like template and things like that. So if we could have something that has been designed plug-in first in mind, that would be great. But once again
The most important, and I'm not going to repeat that enough, is to be able to use familiar pattern and not have to re to relearn a different framework when you go in and out of the admin So what would the architecture look like? Well it would be based on the generic views that Django provides On top of that, we can build a UI layer. It's a matter of just providing a few templates that any view can find. We mentioned things that are not graphics related, so that are not visuals, things like permissions.
And here I'm going to start talking about action. So if you hadn't guessed yet, I did write a proof of concept for a new admin. And I found out that At some point I needed something to hold the recipe for every view that I wanted to have. And I've been calling those actions. So an action says, hey, I have a view and my view is going to be based on a list view. And is going to need those permissions. That's that's the freely base of the of the action and then on top of that, so that this can be extensible and composable, we need a plugin
system Simon Willison wrote DJP, which is a plugin system based on plug-y, and I have used that as a base. And so the action is a great place for the plugin system to say, oh, hi I am a plugin. And for every list action, I would like to register a mixing and I would like to add search capabilities, for example And to bring all that together you need a bit of glue and a bit of glue is in this case the same the same concept as in the base Django admin 2 which was
view factory that just built the view the final view class on demand from what the code you have defined and the plugins that you have installed. And remember, this is how the Django admin works right now. This is how you define an admin, a model admin. And this is straightforward, this is clear, this is easy. This is something that we should absolutely keep. So this is what the same admin looks like in Django Admin 2. Did you spot the difference? The only difference between the two
is the imports. Everything that you have already learned for Django admin works in the new Django admin 2 or Django admin duo. The Django admin 2 package name was already taken. I had to find something else. So this is Django admin 2 But once you have done the steps of changing those imports, Django Admin Do also unlocks a few features. things that I've heard a lot of you mention things that they needed. So like for example for List display instead of just giving the field name I can give a column object that has the field name but has more information like is it sortable is it filterable
For my forms instead of just having field sets I can have a layout object layout object that can have many things in that and the factory will just take all those information and build something with it. So it's it's nice to mention features but maybe it's it's better to see it in action this should autoplay. This does not autoplay. How do I autoplay? Oh how do I play on that? Okay. So this
this might look like just a skin on a Django admin, but it's just it's an entirely different package. It's Django admin du. And it works. It provides the same features. Some of the features of the admin right now. It doesn't provide all the features of the admin. So you can see here basic usage you can edit things that like this is this is something that that you would expect. Right now this is light mode Not only it is in light mode because it's a white background but light mode also as in it's just Django admin 2 with nothing else included So you might have seen already the there was an extra button there in the list.
There was change password for users. This is a new action that you can plug in and it works out of the box in Django Admin Do. You have users, you have a specific view just to change the password, well this can be this can appear directly in the list. Now of course everything else works. And if you look here you see that in form view you also have access to this action, for example. This is a is a small thing, but this shows that this is the this is the regular features do work, the best features that you would expect do work In a bit we're going to be moving to dark mode.
And in dark mode, this is not going to be just Django admin du. This is going to be Django admin du with recommended plugins. So you might have you might notice here that we have the basic features but and we have two fields. We can have multiple fields, multiple columns in the form and things like that But we don't have more advanced things like search and filtering. Search and filtering come provided by plugin. There is a plugin that uses Django filters to add plug to add filtering capability as well as sorting. Search is out of the box You have also advanced form
features that are not available straight out of the box in Django Admin Dov, but you have a plugin for Django Form Set. Django Forms Set is a package that lets you have very complex and full featured Django Forms. So this here uses Django form set. You might not have noticed much difference between the form in the light mode and the dark mode. And that's on purpose, but it's a whole different library using a whole different base view that manages the forms here and it's Django form set that will allow you to do things like conditional display fields or nested in lines out of the box.
So here we also can notice see that we have two different widgets on the sidebar Those are provided by different plugins, but they work together. I am using search and filter right now at the same time and both work together. But with this plugin architecture, I might get lost in my code. What plugin defines what? Is there a mix in there something? So another plugin that is provided is adminDo Classy Docs that will generate CCBV style documentation.
And so you can see very clearly what is defined by what plugin, you can explore the code. You can really you don't have any surprise and see how come my view is doing that well you can go in the documentation you see the you see the method you see what declares the method there is nothing hidden But that's that's good, that's good, it works. How can we know this is robust? How can we know this is not going to break? Well, the best way to know that is to try to break things. And so I did that. Last year I released Django Rest
2. Which is a small REST package that allows you to do REST with only Django code. And so I did a Django Admin the plugin for REST 2. And this is this is the result. This is a front-end JavaScript application that talks to the REST backend. that you just saw and yeah it just works. Didn't break anything. So I think this is clearly a sign that things are robust there are already a list of plugins that work. I'm giving a workshop tomorrow. If you want to know more about those plugins, come to the workshop.
You can trade without any risk because admin 2 works outside of the admin. It can work in parallel. So if you want to give it a try for a specific model, use something that you cannot do in the admin. trade outside and do progressive enhancement. A lot of things do will not require a lot of effort to migrate. There are things that will require absolutely no effort because either they will be provided directly in Django admin or it's third party applications that don't do anything with the admin. And then there was gradual tiers of effort. What is going to be the hardest to integrate with Django Adminder
is that if you are modifying the templates or the view, the change view with your third-party application, that's going to be the hardest to integrate. But if all you do is add an action to the admin like Django import export, that's not going to be too much work. So what's the roadmap for this? Well this probably at least nine months to keep working on the core plugin And then there's probably six to nine months to try to collect data, information from third-party applications
and make sure that All the well-known and most popular third-party applications can work correctly with this kind of architecture. And then if this goes i if this keeps falling, there is a big work of community work. to be able to support everybody who would want to migrate to Django admin. It's not just, hey, here's something, a new package is a new admin. No. Do whatever you want with it. We are going to need to support that and we are going to need to help the users. And this brings me to the core of it. Everything in open source we're always saying, hey, we need more funding.
Ten years ago Jacob Kepler Moss said that it would take about a million dollars to rewrite the admin. I do not have that kind of money. But there are some solutions for that. There's things like the server integrants or NLNet who grants will give grants to open source to maintain or bring new features. So currently I'm waiting to hear back from NLnet for a grant application I put in there. Once I have their reply I will also put in a grant application for the German sovereign tech fund But your company you can also if you're saying oh this is something that I would like to use
you can also sponsor the project by asking me to help you integrate Django Admin 2, adding some features that you need for your own project. This will contribute to the project. If you just want to send me money, you can too. But so what can c what could come next? Well we just saw in the previous talk that permissions are a big thing So more permissions integration with either stock guardian or the authentic guardian. Better support for related model operations. This is currently a bit lacking in and in the internationalization.
I have spent no time on that. Definitely more teams and maybe who knows your project in any case this needs you Please try it, give feedback, install it, come to the workshop tomorrow to have a more detailed look at the project and see how this can solve your problems. And thank you. I think we may still have a bit of time for questions.
Speaker 1
Well amazing, thank you. We do indeed have time for questions. And I guess there will be many, so we will do two or three and then ask her at lunch break or afterwards. So questions, anyone? No take us.
Speaker 3
Yeah, hey, thanks Emma. That was amazing. Thank you. I have a question about the look of the admin. Why doesn't it simply look like the old admin?
Emma Delescolle
Because I wanted it to look familiar, but teams are our plugins as everything else. The core of Django Admin is a plugin itself. So if you want to change the theme, you're more than welcome to do that. I've tried so far to use mostly semantic HTML. I've stayed away of from classes where I could. So it should be pretty easy to skin it, but since this is still a project in an early stage If you start working on a theme today you should expect things to break and have to keep working at it. But
theming is a plug-in like any other functionality in the admin and so If you don't like it, you can change it.
Speaker 1
Okay, we've got another question upstairs.
Speaker 4
Hi, thanks. Imagine that we want to use something like server send events, maybe with signals, so that people looking at the admin got you know live updates. Is this something that would be possible or
Emma Delescolle
yes there's something that would be possible HTMX and dynamic page and receiving events and things like that was something that was on my mind since I started working on this project. Plugins may register front-end elements for different view types, and so they can also register media like CSS, JS, and so on. And so what you would want to do is probably register, have a plugin that registers some JavaScript and maybe a zone on the screen to be able to show notifications or whatever you want to do with those events.
Speaker 1
So one last question and then some small announcements.
Speaker 5
Hi, I also think this is amazing. I wanted to ask you if you tried multi-widgets for fields because maybe I missed it in the demo. For example, OSM widget or daytime picker, how does it handle those widgets? from original Django admin?
Emma Delescolle
So here there are two different things. So there is the simple Django admin duo that's doesn't do anything that Django doesn't do You can still customize it's still a Django form behind it, so you can we you can customize the widget if you want. But if you really want really nice forms and a lot of alternative widgets, I would strongly encourage to using the plugin that uses Django Fromset. Django FromSet comes with many very polished widgets for a lot of things
Speaker 1
Okay, thank you for the great talk and another round of applause.