On 11/02/16 20:11, Andy Baker wrote:
 > As customisable as it can be, I find the problem to be it is
a data-centric view of your system, closely tied to the database models.

You're correct that a truly 'task-centric' UI would be a lot of effort -
but really - how common are such interfaces in their fullest sense? In
reality nearly every admin UI is a fairly clear mirror of the underlying
data schema. Show me a web app and I've got a fairly good chance of
predicting the db tables.

I think this is a matter of scale... for many small to medium scale apps, you can run close to the schema. But for some of the large projects I've worked on, we really needed to hide a lot of complexity from the users.

I suspect that what is much more common is the ability to have
'cross-cutting concerns' - i.e. actions that involved and orchestrate
changes over multiple tables. There are many places that you can enable
such things without needing to twist the admin too far out of shape:
usertools, admin actions, custom changelist columns etc etc.

I absolutely agree with this. Again, for the cases where admin fits, it works well. But going beyond that, there's not a lot of clarity in how to fit in with it.

I'm not claiming any of this results in the 'perfect ui' and given the
budget - yes - a ground-up custom admin would probably be superior. But
real-life projects are nearly always budget constrained - especially
away from the public-facing side - and quite frankly - the Django admin
has enabled me to complete projects that would have been financially
impossible to develop without it.

Unfortunately, what I've seen time and again is when people finally hit the wall in admin customisation, they're too invested in admin to go any other path. So I always advise caution in this - make sure people go in with "eyes open".

 > Is it possible to add other views to admin?  Sure... though it's
not clear, or well documented.

I would argue that it's also fairly clear as it's mostly "just django".
At its simplest an admin view is just a Django view that uses the admin
base template. What's unclear about that? How to incorporate linkage
between the admin-proper and custom views is fairly simple but maybe not
immediately obvious to a beginner. The various hooks for this are fairly
well documented although the documentation is scattered through various
places on this rather monolithic
page: https://docs.djangoproject.com/en/1.9/ref/contrib/admin/

Well, part of the problem is, I believe, that admin is structured very differently to almost every other part of Django. It follows that has been called a "publisher" pattern, where all related views, etc, for a given resource are provided in a single class (more or less).

This monolithic nature is quite different to the "collection of views in a module" approach used elsewhere.

I'm not saying this is wrong, but it does mean you have to learn a whole new approach in order to work with it on anything beyond a superficial level.

A single 'common ways to customize the admin' page could go a long way
to helping here.

+1

--
Curtis

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/56BD14D1.4020505%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to