Hey Bino nevermind I'm learning here and will try to use the same approach, 
so far I already know that I need to get deep on manager, as I've never 
used it before. Keep going!

Thanks!

Em segunda-feira, 25 de fevereiro de 2013 14h56min36s UTC-3, Subodh Nijsure 
escreveu:
>
> Could - Django multitenant cold possibly help you? 
>
> https://pypi.python.org/pypi/django-simple-multitenant 
>
>
> -Subodh 
>
> On Fri, Feb 22, 2013 at 7:43 PM, Delcio Torres 
> <delcio...@gmail.com<javascript:>> 
> wrote: 
> > Dear Sirs, 
> > 
> > Maybe this is a concept question, but here we go. 
> > 
> > I'm doing test development to learn django and using admin for 
> everything. 
> > 
> > This is a Company/Employee/HeathInsurance CRUD system. 
> > 
> > The main ideia is that I want to provide this for different companies 
> and 
> > still not allow them to see each others registers. 
> > 
> > A Django Admin user , should belong to Company or be associated with it 
> > somehow and only see the registers created by other members of the same 
> > company. 
> > 
> > My question is Django Admin Groups from Auth Model would do the task or 
> not. 
> > 
> > I've thought about overriding save_mode and get the group to which the 
> user 
> > belongs , then save it into some group field at HeathInsurance and 
> Employee. 
> > 
> > Then on admin.py thought about overriding the queryset and use a filter 
> so 
> > you would only see registers from your company. 
> > 
> > Is this feasible ? Is this the way? 
> > 
> > Thanks everyone! 
> > 
> > Best Regards, 
> > 
> > Delcio 
> > 
> > Here some model example 
> > ## models.py ## 
> > class Company(models.Model): 
> >     name = models.CharField(max_length=200, null=False) 
> > 
> > 
> > class HeathInsurance(models.Model): 
> >     nome = models.CharField(max_length=200, null=False) 
> > 
> > 
> > class Employee(models.Model): 
> >     name = models.CharField(max_length=200, null=False) 
> >     company = models.ForeignKey(Company) 
> >     health_insurance = models.ForeignKey(HeathInsurance) 
> > 
> > -- 
> > 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...@googlegroups.com <javascript:>. 
> > To post to this group, send email to 
> > django...@googlegroups.com<javascript:>. 
>
> > Visit this group at http://groups.google.com/group/django-users?hl=en. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 
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.


Reply via email to