Django-allauth: custom signup form for socialaccount

天大地大妈咪最大 提交于 2019-12-06 04:07:58

问题


I have found in this question (and the doc) that one can use ACCOUNT_SIGNUP_FORM_CLASS to define some custom form field presented during account registration. However, this form does not seem to appear in the flow of using a social account (at least not by default).

Is there a way to have it, or to easily customize some handlers so that I could introduce such step ? Otherwise, this would give a quite non-unified signup process (people using social accounts would have to go and fill the information afterwards in some settings screen, rather than just being asked it once).


回答1:


As of now you can defined SOCIALACCOUNT_FORMS in your settings to set your own custom social signup form:

SOCIALACCOUNT_FORMS = {
    'signup': 'myproject.myapp.forms.CustomSocialSignupForm'
}


来源:https://stackoverflow.com/questions/18155884/django-allauth-custom-signup-form-for-socialaccount

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!