Is there any way to custom group models in the admin panel?

395 views
Skip to first unread message

Sebastian Macias

unread,
Jul 11, 2007, 6:59:26 PM7/11/07
to Django users
By default models are grouped by app. I really need to be able to
break down that grouping a little bit more. I will have an app with
probably 40-50 models and would like to group those logically instead
of having them all listed under my app name.

Thanks,

Sebastian

Lic. José M. Rodriguez Bacallao

unread,
Jul 12, 2007, 12:02:42 PM7/12/07
to django...@googlegroups.com
I would like to know if this is posible in a simple and clean way, if anyone has the answer, please, post it.

--
Lic. José M. Rodriguez Bacallao
Cupet
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales
-----------------------------------------------------------------

Ryan

unread,
Jul 12, 2007, 5:24:21 PM7/12/07
to Django users
I am interested in this as well. I've searched for a way to organize
models in the admin panel but I haven't found anything. It seems
illogical to create multiple apps simply for the fact to separate them
in the admin panel.

Russell Keith-Magee

unread,
Jul 12, 2007, 9:37:29 PM7/12/07
to django...@googlegroups.com

This isn't possible at present. You can collect the fields on an
individual model into groups, but there isn't currently a mechanism to
group models other than by application.

It is an interesting idea though. I would suggestion opening a ticket
requesting this feature - we are currently rewriting the admin views
to use newforms. This particular feature probably won't be a target
for the initial release, but its worth documenting it to make sure we
don't code ourselves into a corner.

Yours,
Russ Magee %-)

James Bennett

unread,
Jul 12, 2007, 9:57:22 PM7/12/07
to django...@googlegroups.com
On 7/12/07, Russell Keith-Magee <freakb...@gmail.com> wrote:
> This isn't possible at present. You can collect the fields on an
> individual model into groups, but there isn't currently a mechanism to
> group models other than by application.

Sure there is, just supply a template 'admin/index.html' which
specifies the grouping you want, and ensure that it's in a location
which will be found before the app-specific one ;)


--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Sebastian Macias

unread,
Jul 18, 2007, 1:05:02 PM7/18/07
to Django users
I just opened a ticket for this.

http://code.djangoproject.com/ticket/4918

Sebastian Macias


On Jul 12, 6:37 pm, "Russell Keith-Magee" <freakboy3...@gmail.com>
wrote:


> On 7/12/07,SebastianMacias <sebast...@sebastianmacias.com> wrote:
>
>
>
> > By default models are grouped by app. I really need to be able to
> > break down that grouping a little bit more. I will have an app with

> > probably 40-50 models and would like togroupthose logically instead


> > of having them all listed under my app name.
>
> This isn't possible at present. You can collect the fields on an

> individual model into groups, but there isn't currently a mechanism togroupmodels other than by application.

onyilimba martins mclaren tochukwu

unread,
Jan 16, 2021, 1:52:18 AM1/16/21
to Django users
I stumbled on the need to do this, is there any pacakage that does this now? the one I saw was last updated 2018

Prashanjeet Halder

unread,
Jan 17, 2021, 12:39:20 PM1/17/21
to Django users
Not preferred but I guess you can do it by following the below-given steps:
As soon as you end up creating your web app
1) Run the command: "python manage.py collectstatic"
2) Check for the static/admin/index.html file.
3) Edit the HTML files as per your need and convenience.

Please let me know if this answers your question  
I am a newbie in  Django, so I would love to know if there is any other way of doing the same. 

Thanks, 
Happy Coding :)

Reply all
Reply to author
Forward
0 new messages