Re: AbstractBaseUser with a foreignkey...

2013-11-08 Thread Vincenzo Prignano
I think the problem here is that when you create the superuser, the related field will not be created. You should add sistema = models.ForeignKey('Sistema', null=True) or sistema = models.ForeignKey('Sistema', default=1) where 1 is a placeholder 'Sistema' object that you have created. I suggest

AbstractBaseUser with a foreignkey...

2013-11-07 Thread Vanni Brutto
i'm trying to use AbstractBaseUser to extend the user model... i used the code found on django pages, the only difference is that i use a foreignkey to "Sistema" models. The originale code is on django pages: https://docs.djangoproject.com/en/dev/topics/auth/customizing/ my changes was: [...]