开发者

how to change default django-registration Model used in its form?

开发者 https://www.devze.com 2023-02-16 20:34 出处:网络
django-registration use auth User model in its form, but i want to use, class Person( User ): dob= models.DateField(\'Date of Birth\', blank=True, null=True)

django-registration use auth User model in its form, but i want to use,

class Person( User ):
  dob    = models.DateField('Date of Birth', blank=True, null=True)
  ssn    = models.CharField(max_length=16, null=True, blank=True)
  tag    = models.ManyToManyField( PersonTags, related_name="tags" )
  par开发者_如何学Cent = models.ForeignKey('self', null=True, blank=True, related_name='children')

when user registers, it should go to Person and User models, so now how can i do it in django-registration.

Please help me and thanx in advance :)

0

精彩评论

暂无评论...
验证码 换一张
取 消