Re: Extend user model: class inheritance or OneToOneField?

2012-07-17 Thread Alessandro De Noia
Hi 2012/7/14 Melvyn Sopacua > > Important question: Why? > > I need to store more information about the user, like birthday, language preference etc Moreover I need to have two different users and store different information for each user type. In a near future I will need to integrate auth an

Re: Extend user model: class inheritance or OneToOneField?

2012-07-14 Thread Melvyn Sopacua
On 14-7-2012 0:18, sdonk wrote: > I'm starting a new project and for the first time I need to extend the User > model. Important question: Why? > I read the documentation and I googled a lot to try to figure out what is > the best approach but I got confused. > > What's the the best approach?

Re: Extend user model: class inheritance or OneToOneField?

2012-07-13 Thread Ernesto Guevara
Hi! I prefer using OnetoOne with a pre_delete signal to remove user from a pirncipal object instance: from django.contrib.auth.models import User from django.db.models.signals import pre_delete from django.dispatch import receiver class Customer(User): user = models.OneToOneField(User) @rec

Extend user model: class inheritance or OneToOneField?

2012-07-13 Thread sdonk
Hi, I'm starting a new project and for the first time I need to extend the User model. I read the documentation and I googled a lot to try to figure out what is the best approach but I got confused. What's the the best approach? Class inheritance: from django.contrib.gis.db import models from