如何更改其表单中使用的默认django-registration模型?

时间:2011-03-14 09:21:33

标签: django django-models django-registration

django-registration在其表单中使用auth User模型,但我想使用

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" )
  parent = models.ForeignKey('self', null=True, blank=True, related_name='children')

当用户注册时,它应该转到Person和User模型,所以现在我怎样才能在django-registration中进行操作。

请提前帮助我和thanx:)

1 个答案:

答案 0 :(得分:1)

这是通过信号做到这一点的更简单的解决方案。只是转到这个链接..

  

django registration form custom field