views:

42

answers:

2

Using the django admin, I would like to be able to specify which models a user sees when he logs in. For a stretch goal, for each model types a user can see, I would like to specify a filter to limit which instances of the model the user can see.

Could someone please provide a pointer for how to go about achieving this?

A: 

Take a look at group-level permissions in the Admin (scroll down). Django 1.2 has introduced hooks for object-level permissions too

stevejalim
Does Django admin provide a hook into which instances are displayed for a given model? If that's available, I can maybe use the Auth framework to determine current user identity and what to display
theactiveactor
+1  A: 

You can specify which models the user can see and manipulate using the admin itself. You can do this when you're logged in as a superuser.

Regarding your stretch goal, a simple answer is detailed here.

Jonathan