Live data from Hacker News

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

news.ycombinator.com

11–20 of 86 posts

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

#11
It’s mostly just a UI for CRUD. And most systems are more complex, requiring UIs that operate on business logic.

Rails and Phoenix also offer similar features (called scaffolds), but they are optional. I’m sure other frameworks have similar options.

Meanwhile, Django (like Python) sometimes has unconventional names and approaches to doing common things, so that makes the pair unpleasant and awkward for those of us with experience with several other tools and frameworks.

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

#12

Mostly because it is dangerous (or was). For example, an integer that can only be 1, 2, or 3. In the admin (way back in the day, at least), someone could go into the admin and set it to 4. Which would then break everything in subtle ways. Also, most applications have constraints like "X can only be 2 if and only if Y is equal to Z" ... there was no way to specify that constraint to the admin interface, so someone cou…

I don't know Django but doesn't model validation apply to the admin screens?

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

#13

It’s mostly just a UI for CRUD. And most systems are more complex, requiring UIs that operate on business logic. Rails and Phoenix also offer similar features (called scaffolds), but they are optional. I’m sure other frameworks have similar options. Meanwhile, Django (like Python) sometimes has unconventional names and approaches to doing common things, so that makes the pair unpleasant and awkward for those of us wi…

> most systems are more complex

Citation needed. We also have got a _lot_ of mileage out of it over the years.

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

#14

Mostly because it is dangerous (or was). For example, an integer that can only be 1, 2, or 3. In the admin (way back in the day, at least), someone could go into the admin and set it to 4. Which would then break everything in subtle ways. Also, most applications have constraints like "X can only be 2 if and only if Y is equal to Z" ... there was no way to specify that constraint to the admin interface, so someone cou…

I think you can can still have those checks as pre_saves in your models

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

#15

Mostly because it is dangerous (or was). For example, an integer that can only be 1, 2, or 3. In the admin (way back in the day, at least), someone could go into the admin and set it to 4. Which would then break everything in subtle ways. Also, most applications have constraints like "X can only be 2 if and only if Y is equal to Z" ... there was no way to specify that constraint to the admin interface, so someone cou…

I don't know Django but doesn't model validation apply to the admin screens?

It does but in general there’s less insistence (as compared to Rails, for example) to have “smart models, dumb controllers” - therefore in Django a lot of business logic can end up in the controller and thus doesn’t apply in the admin.

This is a convention though - one could just as easily do it the other way and embed all the business rules in the models.

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

#16
Admin for Symfony Framework ( PHP )

https://symfony.com/bundles/EasyAdminBundle/current/index.ht...

Admin for Laravel (PHP) https://nova.laravel.com/

Java Spring Boot https://docs.spring-boot-admin.com/current/getting-started.h...

I think many other Frameworks have this, did you search for it?

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

#17

Mostly because it is dangerous (or was). For example, an integer that can only be 1, 2, or 3. In the admin (way back in the day, at least), someone could go into the admin and set it to 4. Which would then break everything in subtle ways. Also, most applications have constraints like "X can only be 2 if and only if Y is equal to Z" ... there was no way to specify that constraint to the admin interface, so someone cou…

I don't know Django but doesn't model validation apply to the admin screens?

It used to not be IIRC. This was over a decade ago, so my information is likely outdated, but it might explain why other languages chose not to implement it. Further, a model may be valid, but make no sense to an application. For example, a car may have 6 wheels and still be a car ... but might be out-of-bounds for a simulation expecting 4 wheels.

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

#18

Admin for Symfony Framework ( PHP ) https://symfony.com/bundles/EasyAdminBundle/current/index.ht... Admin for Laravel (PHP) https://nova.laravel.com/ Java Spring Boot https://docs.spring-boot-admin.com/current/getting-started.h... I think many other Frameworks have this, did you search for it?

The Spring one linked above is not really comparable to Django admin in my opinion. In particular it doesn’t integrate with your data model at all - it essentially just shows actuator endpoints.

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

#19

Mostly because it is dangerous (or was). For example, an integer that can only be 1, 2, or 3. In the admin (way back in the day, at least), someone could go into the admin and set it to 4. Which would then break everything in subtle ways. Also, most applications have constraints like "X can only be 2 if and only if Y is equal to Z" ... there was no way to specify that constraint to the admin interface, so someone cou…

if your model is a choicefield, then it only shows you those values and you can’t do what you are describing. Additionally, you have validation that can happen at the class level, group of fields, or field.

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

#20
It's hard to do well, especially if the framework isn't built from the ground-up to meaningfully model database schemas. It basically involves creating a CMS which is a project in of itself. Do you stop at building Django or do you keep going until you have created Wagtail? There's a ton of value in it, but it's tough.
Post reply on HN