In an application I'm writing I have a model that stores admins by
location in a model called LocationAdmin.  So in this model I have a
foreign key to User and a foreign key to a Location object.

I would like to override the save() method so that when an Admin is
created they are assigned to a special group (auth group).  This group
would be called something like "Location Admins" and have various
permissions.

I have having a hard time finding a way let alone the correct way to
do this.

I feel that the group should be created when running syncdb but by
using a fixture I'd have to hard code the permissions keys that the
group needs.

Its almost like I need a fixture that runs some python script that
runs Permission.objects.get to go after the wanted permissions.

Is there a mechanism to do something like?
--~--~---------~--~----~------------~-------~--~----~
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