Django-allauth: custom signup form for socialaccou

2020-07-18 05:45发布

问题:

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'
}