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

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -