6 ms·
It's probably a combination of things. The Django Admin existed before Django publicly existed. That meant that once anyone started using Django they knew that
by mdasen 3y ago
It's probably a combination of things.
The Django Admin existed before Django publicly existed. That meant that once anyone started using Django they knew that they should constrain their use of Django in certain ways so that the Django Admin would work with their usage. Features that would be added to Django would be built with the Django Admin in mind.
Many tools like Flask or FastAPI don't have an opinionated model layer like Django. Without that, you can't really create an admin interface programatically. People could be storing their data in any sort of fashion anywhere. How would one build an admin system for something like Flask or FastAPI where there's no convention around how people set up data access? A lot of frameworks out there don't tell you "access your data in this way" or "this is how users will be authenticated." Without those two things, it's hard to really create an admin system.
There are similar systems available for some frameworks, but since they aren't part of the core framework, they don't get the same attention. Someone creates it, but it doesn't have the kind of community buy-in that sustains it. One of the odd things about Django is that the admin system is under `django.contrib` which indicated that they didn't intend for it to be in the core of Django forever, but that's not really how `django.contrib` ended up. It continued to be a core part of Django maintained as part of the framework.
Like I said, there are admin dashboards available in other frameworks like RailsAdmin (https://github.com/railsadminteam/rails_admin https://github.com/railsadminteam/rails_admin) or Core Admin for .NET (https://github.com/edandersen/core-admin https://github.com/edandersen/core-admin) and I'm sure there's more. However, both Rails and .NET provide most of what Django provides (and a lot more than most frameworks). Rails and .NET both have a default data access ORM that a majority of people using those frameworks tend to use. .NET has built-in authentication/authorization so the admin can work off that. Rails doesn't have auth, but RailsAdmin uses some plugins.
There's even Flask-Admin: https://flask-admin.readthedocs.io/en/latest/ https://flask-admin.readthedocs.io/en/latest/. However, if you start reading through the docs you start seeing that you have to solve more than just dropping it in. How do you do auth and permissions? Have you used SQLAlchemy, MongoEngine, PeeWee, or PyMango to access your data? No? Well, you might need to write a way for it to actually figure out your data. Because Flask apps aren't generally written with Flask-Admin in mind and because Flask doesn't offer a default path for things like models and auth, it becomes a harder and more varied task to create a generic admin system.
- stuartjohnson12 3y agoI'm trying to figure this out, or understand if this is moment to try and do something about it. This seems like such a common use-case but the offerings across frameworks are all fragmented and sad. We're at a scale now where Django Admin is creaking and the lack of extensibility is killing us - for example, we'd love to build actions that work based on specific form inputs rather than just the standard atomic bulk actions that Django Admin supports. We've tried some experiments to do this and it's rapidly looking like doing this at any kind of scale is going to turn us to mud. While I was looking for something for us to upgrade off of Django admin to, it seems like the main presence here is something like ReTool or Airplane.dev. The common consensus in these tools seems to be that the way to build admin dashboards in a framework-agnostic way is to build drag'n'drop interfaces and then have lots of little individually deployable scripts which run SQL queries. This seems like such a sad state of affairs. Do you know of any tools that are able to cope with data storage agnosticism in a way that feels more like software engineering?
- mdasen 3y agoI think you've kinda hit why systems like the Django Admin aren't more common. At some point you simply need to build custom code. I've seen engineers spend so much time futzing with the Django Admin trying to contort it to their use case when they could have just built their own form in a fraction of the time. I was going to question the "tremendous value of Django Admin", but I thought I shouldn't. I was going to say something along the lines that it creates this mediocre form inputs so that backend engineers don't have to write an HTML form and they can ship something to their users without having to touch the front-end. However, I actually do agree that there is a good amount of value in the Django Admin. Having a mediocre UI to touch the data is really valuable. I think the problem is that you start thinking it should be the only UI for touching the data. The solution to your problem might be creating something custom with some utilities. What does the Django Admin offer you? A way of displaying a table of data? A link to a form to update that data? You could build what you need. I'm not sure what you're looking for in terms of something "that feels more like software engineering." I don't even know what your use case is for the Django Admin. Are you a shop doing lots of small projects for clients so you need a way for them to edit the data that looks passably professional while taking the absolute minimum of dev time? Are you creating a single product and maybe you should just spend a little bit more time on data access? Why do you want something that "feels like software engineering?" At some point, there might be cases where you simply need custom stuff for certain things.