On 4 Sep., 15:30, Russell Keith-Magee <[email protected]> wrote:
> On Fri, Sep 4, 2009 at 8:37 PM, patrickk<[email protected]> wrote:
>
> > fair enough.
>
> > I don´t have a problem with just seperating INSTALLED_APPS from
> > ADMIN_APPS within the settings-file. I just thought another admin-file
> > is nicer (but that´s not the key argument of my proposal).
>
> > INSTALLED_APPS = (
> >    'django.contrib.auth',
> >    'django.contrib.contenttypes',
> >    'django.contrib.sessions',
> >    'django.contrib.sites',
> >    'django.contrib.admin',
> >    'movies',
> >    'stars',
> >    'cinemas',
> >    'games',
> >    'promos',
> >    'polls',
> >    'festivals',
> >    'trailer',
> >    'user',
> >    'registration',
> >    'voting',
> >    'django.contrib.comments',
> >    'custom_tags',
> >    'mediadata',
> >    'stats',
> >    'newsletter',
> > )
>
> > ADMIN_APPS = (
> >    (_('User Management'), {
> >        'apps': ('django.contrib.auth', 'registration', 'user',)
> >    }),
> >    (_('Main Content'), {
> >        'apps': ('movies', 'stars', 'cinemas', 'festivals',
> > 'trailer',)
> >    }),
> >    (_('Games'), {
> >        'apps': ('games', 'promos', 'polls',)
> >    }),
> >    (_('Voting/Comments'), {
> >        'classes': ('collapsed',),
> >        'apps': ('voting', 'comments',)
> >    }),
> >    (_('Extras'), {
> >        'classes': ('collapsed',),
> >        'apps': ('mediadata', 'stats', 'newsletter',)
> >    }),
> > )
>
> > if you need more details, please let me know.
>
> Well, for starters, some clarification would help.
>
> Are we talking about an alternate organization for models in the admin
> so you're not bound to app-based categories, or are we talking about
> some higher level organization?
>
> Your example puts django.contrib.auth into the 'User Management'
> collection - is that indicating that all the apps in auth should be
> shown in "User Management", or that there is a "User Management"
> super-group that contains the auth group that contains the auth
> applications?

I´d personally replace the group "Auth" with the group "User
Management".
the reason is that "Auth" is an application (something which is - IMHO
- irrelevant for an editor to know/see).

that said, I can also think of putting the group "Auth" within the
super-group "User Management". however, I don´t think that´s necessary
and makes the admin index page more complicated.

> Your language is particularly confusing in this regard - it isn't
> clear when you say 'apps' if you actually mean 'models'.

sorry. trying to concentrate on the right terms a bit more.

> Secondly, why would this be included in settings.py (or a top level
> admin.py for that matter)? Admin registrations are currently
> distributed across the apps in the entire project - why is there a
> need to pull this into a single location?

the only reason I can think of is to change the order of collections
(see below).

> Couldn't this be achieved by registering a model with a particular
> "app collection" (with the default being the collection formed by the
> app containing the model)?

from my point of view this leads to the problem of sorting the "app
collections". how would you achieve that? e.g., if I want "User
Management" to be shown as the first collection (independent of the
collections name)?

moreover, it´d be nice (at least from a theoretical point of view) to
assign an app (or model) to more than one collection.

regards,
patrick

> i.e., to create a "User Management" group, and put "user" in it:
>
> class UserManagement(AdminGroup):
>     label = "UserManagement"
>
> class UserAdmin(ModelAdmin):
>    ...
> class UserAdmin(ModelAdmin):
>    ...
>
> admin.site.register(User, UserAdmin, group=UserManagement)
>
> Yours,
> Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to