Dear Gabriel Sir. I really appreciate your response On Saturday, February 23, 2013 11:00:10 PM UTC+7, Gabriel - Iulian Dumbrava wrote: > > How I would do it would be to have a special column (foreign key) in each > table (model) called Company (company_id)
Yes , thats the plan > and change all default managers to filter on company_id = > logged_in_user.company_id. > > In this way you are sure tha users only see what belongs to their company. > > Yes, it'll required. Anyway, what you mean with 'default manager' ? > You would have to pass the company_id to models, probably with a > middleware which gets it from the logged in user and saves it somewhere. > Kindly please give me more clue on this Sincerely -bino- > And you also have to save the default value of company_id to each newly > created entry in every table, probably from the same source as above. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.