Re: How to restrict Model.objects.all() to data pertaining to one organization

2018-04-10 Thread Gabriel - Iulian Dumbrava
I think django-multitenant gives you the best answer. marți, 10 aprilie 2018, 14:04:03 UTC+3, Mauro Crociara a scris: > > Hi everyone, > > I posted this question >

Re: How to restrict Model.objects.all() to data pertaining to one organization

2018-04-10 Thread Gabriel - Iulian Dumbrava
Please take a look at this comparison grid. At least one of those packages allows automatic filtering of queries if you set it up properly. For example, each table must have that 'organisation' field to filter on it. marți, 10 aprilie 2018,

Re: How to restrict Model.objects.all() to data pertaining to one organization

2018-04-10 Thread Jason
Looking at your SO question, seems to me you're expecting some magic to happen without any pertinent information available to execute that filter. There are a couple things I can think of to add more information to the incoming request to help you use the custom model manager. For example,

Re: How to restrict Model.objects.all() to data pertaining to one organization

2018-04-10 Thread Jani Tiainen
Hi. Model.objects.filter (organization=organization) Or did you mean something else? ti 10. huhtikuuta 2018 klo 14.03 Mauro Crociara kirjoitti: > Hi everyone, > > I posted this question >