【发布时间】:2009-12-15 19:04:33
【问题描述】:
在我的应用程序中,我将AUTH_PROFILE_MODULE 设置为users.UserProfile。这个 UserProfile 有一个函数 create 应该在新用户注册时调用,然后创建 UserProfile 条目。
根据 django-registration 文档,所有需要做的就是在我的 urls.py 中设置 profile_callback 条目。我的看起来像这样:
url(r'^register/$', register, {'form_class': RecaptchaRegistrationForm,
'profile_callback': UserProfile.objects.create,
'backend': 'registration.backends.default.DefaultBackend',},
name='registration_register')
但我收到此错误:
异常值:register() 得到了一个意外的关键字参数“profile_callback”
那么我必须把它放在哪里才能让它工作呢?
【问题讨论】:
标签: django