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?

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

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?

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)?

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