Re: Creating subusers

2014-07-02 Thread Lachlan Musicman
Ah, ok, I see your problem is different - the Intermediate object probably isn't your friend. You can try the various levels of User, with various subclasses... http://www.django-rest-framework.org/api-guide/permissions Has some good ideas. cheers L. On 2 July 2014 19:52, Jorge Andrés Vergara

Re: Creating subusers

2014-07-02 Thread Jorge Andrés Vergara Ebratt
Hey Lachlan, I read the docs you sent me and I have a question, what if (in that example from the docs that uses Person, Group and Membership) I needed the Group class to be an user too? Like the Group was an user that can create, update and delete every user in itself and also all the information

Re: Creating subusers

2014-07-02 Thread Mike Dewhirst
On 2/07/2014 3:16 PM, Lachlan Musicman wrote: I would recommend Intermediate Models as a good solution for these type of weird situations https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships +1 Cheers L. On 2 July 2014 12:20, Jorge Andrés

Re: Creating subusers

2014-07-01 Thread Lachlan Musicman
I would recommend Intermediate Models as a good solution for these type of weird situations https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships Cheers L. On 2 July 2014 12:20, Jorge Andrés Vergara Ebratt wrote: > Hello

Re: Creating subusers

2014-07-01 Thread Mario Gudelj
Hey Jorge, I think you should extend the Abstract User instead of doing it the old way, which is creating that OneToOne relationship with a custom model. So, you'll end up with this: class IndependentAgent(AbstractBaseUser, PermissionsMixin): tipo_licencia = models.CharField(max_lenght=140)

Creating subusers

2014-07-01 Thread Jorge Andrés Vergara Ebratt
Hello everyone, I'm trying to create a system that has 3 different user types: Independent Agent, that basically is what it sounds like, and Django's User Model works fine for this one. But the catch comes from the other 2, because it also needs to support agencies and agencies have