django - Permission on specific instances of a model -


i've got customuser model additional field region , other models same field.

how can allow instance of customuser add/delete/view instances of other models (give permissions) same region value only?

edit

using custom manager, suggested vivek soundrapandi, can do

class shopmanager(models.manager):     def get_query_set(self):         return super(shopmanager, self).get_query_set().filter(region=?) 

but how can filter shop instances region of connected user?

and still allow customuser modify shop instances other region using default manager, right?

there no way using django permission system?

thanks

use django-guardian (actually that's it, wants more characters)


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -