django注册应用程序和Django 1.5自定义用户模型 [英] django-registration app and Django 1.5 custom user model
本文介绍了django注册应用程序和Django 1.5自定义用户模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
class CustomProfile(models.Model):
user = models.ForeignKey(User)
name = models.CharField(max_length = 255)
bank = models.CharField(max_length = 255)
address = models.CharField(max_length = 255)
?
解决方案
django-registration的主叉与django 1.5现在不兼容。
检查此拉请求。
您有三个选项:
- 补丁django注册的代码。您可以从拉取请求中获取所需的更改。
- 使用已经打补丁的非官方分支。 这一个。例如
- 等待更新主叉...
I use django-registration app and Django 1.5. How to create (new in django) custom user model and save also this data during registration (Please note that I am using django-registration):
class CustomProfile(models.Model):
user = models.ForeignKey(User)
name = models.CharField(max_length=255)
bank = models.CharField(max_length=255)
address = models.CharField(max_length=255)
?
解决方案
django-registration's main fork is not compatible with django 1.5 for now.
Check this pull request.
You have three options:
- Patch django-registration's code. You can get the changes needed from the pull request.
- Use an unofficial fork that is already patched. This one for example.
- Wait for an update on the main fork...
这篇关于django注册应用程序和Django 1.5自定义用户模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文