Live data from Hacker News

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

news.ycombinator.com

31–40 of 86 posts

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

#31
Keeping in mind I'm referring to Django years ago, as I dont know how many of these limitations have since been lifted, the Django admin was able to be successful because Django itself only allowed a narrow subset of database constructs to be modeled in the first place. You had tables with single-column primary keys only, and then you had simple one to many, many to one, many-to-many, and their "generic foreign key" thing, and IIUC that was it. This narrow band of possible database configurations made it easier to put an admin on top of (and also to generalize into DB migrations).

There are "django-admin" style tools for SQLAlchemy (or at least there were, back when people had the notion that "the Django admin" was why Django was successful), but they have a hard time being able to generalize to SQLAlchemy's capabilities for things like table inheritance, custom join conditions, composite keys, etc. Our users, when they build out their database schemas, are throwing the whole kitchen sink in there and producing a much more personalized kind of product that does not lend itself as well to a generic CRUD gui. Nor do a lot of SQLAlchemy users really want such a thing, since they will have these very particular types of models with lots of nooks and crannies that they'd prefer to code up themselves.

The SQLAlchemy approach is a lot more schema oriented whereas the Django one strikes me as intentionally narrowed for simplicity.

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

#33

Earlier quoted context omitted.

> most systems are more complex Citation needed. We also have got a _lot_ of mileage out of it over the years.

Ok, how complex are _your_ systems? Simple table views are available through a number of database management software (dbeaver). What does django provide beyond that?

You can customize the admin so it only shows some tables, you can add actions that run things in the backend, the changes go through your Django models so they run validation etc.

In short you really can give it to knowledgeable admins at customers to configure and admin applications with, in a way that you can't just let them edit database tables.

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

#34

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?

yes it does if implemented correctly with that intention in mind

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

#35

Earlier quoted context omitted.

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.

I can confirm you can do this validation now, but it's not super-super easy.

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

#36

I've been out of web development for about four years now, but I think Django is unusual in providing the admin dashboard for free. Most frameworks don't want to devote the resources to that when there are third-party options you can fairly easily (ha ha) bolt on to your project. Speculatively, it may be that Django comes from a time before such a wide variety of self-service solutions existed, and based on the newsp…

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/

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

#37

Earlier quoted context omitted.

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.

Must have been well over a decade because Django models have had deep integration with the form validation API since I started my career.

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

#38

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…

You can perfectly do business logic operations through the django Admin. It's extensible, and doesn't require a lot of effort to set it up.
Post reply on HN