Customising django-allauth's socialaccount signup form -
I am successfully using my custom form class with standard account registration, although I can not seem to have a social account sign Up to the custom form class (the default signup form is always loaded).
As suggested in the question, I have set the SOCIALACCOUNT_AUTO_SIGNUP = False
. And as I have suggested, I am using the following setting:
SOCIALACCOUNT_FORMS = {'signup': 'someapp.forms.SocialSignupForm'}
The code for a custom form class looks something like this (lots of suggestions have been given):
class SocialSignupForm (forms.Form): foo = forms.CharField (max_length = 255) (Self, request, user): user.foo = self.cleaned_data ['foo'] user, label = 'Foo', widget = forms.TextInput ({placeholder: 'bar'}) Save ()
answer my own question To answer, the problem was that the setting SOCIALACCOUNT_FORMS
(and therefore optimize the signup form) is only available from Déjengo-Allay 0.17.1.
My installed version is 0.17.0 (Installed via PIP), currently, need to install 0.17.1 from source.
Comments
Post a Comment