views:

62

answers:

2

I have models that belong to some 'group' (Company class). I want to add users, who will also belong to a one group and should be able to edit/manage/add objects with membership in associated group.

something like:

class Company()

class Something()
  company = ForeignKey(Company)

user Microsoft_admin
  company = ForeignKey(Company)

and this user should only see and edit objects belonging to associated Company in the Admin Interface.

How to acomplish that?

A: 

hey, maybe you can do something like this

eos87
YES! Thank you very much.
JPG
A: 

There are a few different ways to do it. The magic words that you're looking for are "row level permissions". Search for that and "Django" and you should find what you're looking for.

Beyond a certain point though, it's easier to roll your own views. It all depends on your use case, and what exactly you're trying to achieve.

Anthony Briggs