Live data from Hacker News

Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

news.ycombinator.com

61–70 of 86 posts

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#61

A core developer of Django, I think Carlton Gibson but can't find it, mentioned in a podcast that if one were to commission the development of Django's admin interface from scratch today, it could cost around $1 million USD.

Hmm. I know Django admin is one of the best things about Django... but why $1m? If each developer gets paid $200k/yr, that's 5 developers for 1 year? Sounds crazy to me.

Given the flexibility and depth of the django admin, 5 good developers working on it for 1 year sounds about right.

200k/year might sound like a lot but then in a real business there are various overhead costs as well.

I'd say $1m is probably on the lower side of the estimate. Factoring in project delays and misc Murphy law things, wouldn't be surprised if a mediocre team underdelivers with a crappy immitation of the django admin interface after blowing through a couple mil.

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#62
post #54

Can you clarify what's the "tremendous value" you're getting out of the Django admin? At Heii On-Call https://heiioncall.com/ we are using Active Admin https://activeadmin.info/ for Ruby on Rails, which seems quite similar to the Django admin. In my experience, it's mostly useful as a fairly basic read-only view of what's in the database. In Rails, it's so easy to whip together a custom view that we tend to do that,…

The value in the Django admin is much more about data entry than purely read-only data access.

Totally agree.

I recently dabbled a bit in stock picking, and built a system to record my commentaries on stocks and my subjective valuation, so that I can refer to them later (so that I have something to base my trades on other than pure emotion).

I just defined the models and used the admin interface for all the editing. I mean, in theory it's not much different from using an excel spreadsheet to keep my records, but I get a full SQL database and a customizable webUI for free after I defined my models. And if I need anything fancy I have a fully programmable system that I can extend arbitrarily.

In django, as long as the functionality is only exposed to trusted users (hence it's called "admin"), there's very little reason to write any "views" logic after you defined the model and basic controller logic.

It's basically the generic CRUD app that you don't have to write.

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#64
post #57

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 mode…

I'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…

I 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.

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#65

A core developer of Django, I think Carlton Gibson but can't find it, mentioned in a podcast that if one were to commission the development of Django's admin interface from scratch today, it could cost around $1 million USD.

Hmm. I know Django admin is one of the best things about Django... but why $1m? If each developer gets paid $200k/yr, that's 5 developers for 1 year? Sounds crazy to me.

There is the frontend and the backend, the whole introspection stack, the admin customization layer, and the integration with permission, filtering, caching, etc.

Add on top of that documentation, testing, and making the whole thing completely independent and pluggable (as django must work without it) but perfectly integrated with it (settings, forms, template overrides, etc).

That's a lot.

You might get feature parity with less, but not with the same guarantees of stability and maturity.

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#66
post #64

Earlier quoted context omitted.

I'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…

I 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 s…

I think what you're calling mediocre is precisely the same thing I was calling tremendous - the fact it allows us to ship mediocre form inputs with complex programmatic validation and permissions without the need to touch a line of frontend is indeed pretty great.

The use case is https://spotdx.com. We're a YC backed healthtech product with a significant amount of need for safe manual data entry and updates, and the requirements for that data entry evolves semi-frequently. Compared to a traditional frontend framework (say, React), Django Admin drastically slashes the amount of engineering resources needed to ship new kinds of mediocre form input. The way we work at the moment doesn't require a frontend engineer at all to get new internal stuff done.

There's a lot of cool work that has been done across various frameworks to put CRUD interfaces of varying complexity on top of an ORM, but it all seems so repeated and fragmented, and varies wildly in quality between frameworks. I wish there was a tool like ReTool that was tied to our regular backend and ORM.

We do use React for other parts of our product, but avoiding it here is handy.

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#67
post #36

Earlier quoted context omitted.

We originally created Django as a CMS for some newspaper websites. We didn't even think of it as a framework - we called it "the CMS" for the first ~10 months that we were working on it. https://simonwillison.net/2010/Aug/24/what-is-the-history/

I'm curious how you think about Django's CMS capabilities compared to less opinionated languages and frameworks. Do you think the fact that Django is so opinionated is necessary for Django to be as good as it is? If Django was built more like FastAPI could something like Django Admin still work? Is Django Admin special because of the execution, or because of the capabilities that the design of Django enables it to ha…

Personally I think it's mainly down to the fact that the ORM and admin were designed together, with the intention of supporting the subset of operations needed to build a CMS.

That's one of the reasons it doesn't support things like compound primary keys very well - it turns out you don't really need those for the common CMS subset of functionality.

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#68
Activeadmin in rails. The reason I believe you need an extremely widespread framework that standardized everything, like rails or django.

Kinda funny how I really disliked activeadmin 10 years ago, now I have an app that's been running for like 12 years using it and it's been doing great. Also, activeadmin improved drastically, kudos to the community

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#69
post #64

Earlier quoted context omitted.

I 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 s…

I think what you're calling mediocre is precisely the same thing I was calling tremendous - the fact it allows us to ship mediocre form inputs with complex programmatic validation and permissions without the need to touch a line of frontend is indeed pretty great. The use case is https://spotdx.com . We're a YC backed healthtech product with a significant amount of need for safe manual data entry and updates, and the…

Mediocre might not have been the right word. I think we really don't have a word for "it's nothing great, but because the cost is almost nothing it kinda is great." Like I said, it is great because it lets everyone touch the data with almost no effort. However, it's not great because you can end up bumping against limitations that will happen with basically anything pre-made.

You're right: the other tools often aren't amazing and part of that is because critical mass makes things better. The fact that the Django Admin is so common in the Django world means that it gets exposed to many different use cases and things work pretty well with it.

To take a step back, some of this is the framework vs. library debate. With a framework, you're getting libraries where the edges between the libraries have been smoothed over and there's a certain assurance that things will work together well. With a library, it can be a very high-quality library, but it can feel like it doesn't quite work with your stuff. Part of that is that it's hard to anticipate everything people will do.

I am curious what you like about ReTool and what you don't. It sounded like you wanted something that felt more like software engineering than like ReTool's low-code drag-and-drop experience, but maybe I'm wrong. In terms of being integrated with your regular backend and ORM: is the point that you want it (for example) to be able to re-use filters you've already set up in a model and therefore if you update those filters in the future, you don't have to also update them in whatever query ReTool is using?

I think part of the issue is that the Django Admin serves what most people need and once they go beyond that, they'll just hook in a tiny bit of custom stuff. I haven't used Django since before the pandemic so I don't remember everywhere you can hook into the admin system, but I kinda remember being able to being able to create custom pages in `admin/model-name/custom-view-name.html` and then being able to do a custom view that used the Django auth (https://docs.djangoproject.com/en/4.2/topics/auth/default/#t...). Maybe the answer for the bulk stuff is simply doing your own list-view for the occasions you need it. For example, if you want to have a form field that's like "Update all names to what's in the box", you could just override the template for that model, create a little form at the top, have it submit to a custom action within the admin that does the work, and then redirects back. Again, it's been a while since I've used Django, but you can always extend things like `django.contrib.admin.views.main.ChangeList`. I also don't completely understand your use case because we're just having a very small conversation on HN so my comment might be completely off base. But I remember just extending the existing Django stuff and overriding stuff.

I'd also say that sometimes it can be helpful to take a step back and think if there's a different way of getting to where you're trying to go. If there's something that you need that happens kinda rarely, you can always create a new page within the section for that model and then have a link to that page. Then just do custom stuff there. Are your requirements that go beyond what the Django admin can do something that you're running into constantly or something that's blocking you on a couple of tiny edge cases? If it's the latter, maybe stuff a custom Django admin view in a couple places.

Ultimately, I think the issue is that open source often stops at a certain point. Tools like ReTool are built to scratch a different itch: the itch for enterprise businesses that want a low-code solution and are willing to pay someone to abstract a lot of stuff. In the open source world, things often stop way short of what the Django admin offers - heck, that's the entire thesis of your initial post. It's hard to create good, general tools because everyone wants something slightly different and you end up building your own mini-programming language as it gets general enough. The companies/people who try to go that route are generally targeting enterprise executives and not software engineers. But I certainly understand wishing that the Django Admin just did things a little different or a little better.

Re: Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?

#70
post #9

As soon as you need frontend auth you'll regret going with flask or fastapi. There is no equivalent in the python world for django admin

Can you elaborate? Both Flask and FastAPI support various authentication methods.
Post reply on HN