I love the admin interface, and it works perfectly for almost every
aspect of the application I am writing. However, I have discovered
that the default behavior of the admin interface to list all models in
one grouping is not ideal in my case...

I have a *large* number of models (that are based on a few "abstract"
model classes) . Ideally I'd like to add behavior to the admin
interface so that when listing all the models for an application like
mine, it sorts them out based on the abstract class they subclass.

My current solution (which is less than ideal) involves subclassing
AdminSite, over-ridding the app_index method and creating a separate
template. In the over-ridden app_index I sort out the models into
three lists. In the custom index template I display the 3 lists of
models under different headings.

Allow me to present some cobbled together and primitive text-based
examples for those who are still following....

What happens by default in the admin section for my app:

[django admin heading etc]
(My app name)
Model1
Model2
Model...
Model...
Model...
Model...
Model_n

Ideally I'd like the admin to generate a listing like this:

[django admin heading etc]
(My app name)
Model1
Model2
(Group for models that subclass abstract class A)
Model...
Model...
(Group for models that subclass abstract class B)
Model...
Model_n

I am guessing I am not the first to run into this type of issue and
any help would be greatly appreciated!

-Matt

(Please let me know if anything needs more explanation as well)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to