I'm trying to custom the AllAuth interface. I can override LoginForm and SignupForm separately, but if I override both of them, I got this error :
Module "app.forms" does not define a "BootstrapSignupForm" class
my forms :
class BootstrapLoginForm(LoginForm):
def __init__(self, *args, **kwargs):
super(BootstrapLoginForm, self).__init__(*args, **kwargs)
self.fields['login'].widget.attrs['class'] = 'form-control';
self.fields['login'].widget.attrs['placeholder'] = 'User name';
self.fields['password'].widget.attrs['class'] = 'form-control';
self.fields['password'].widget.attrs['placeholder'] = 'Password';
class BootstrapSignupForm(SignupForm):
def __init__(self, *args, **kwargs):
super(BootstrapSignupForm, self).__init__(*args, **kwargs)
self.fields['username'].widget.attrs['class'] = 'form-control';
self.fields['username'].widget.attrs['placeholder'] = 'user name';
my settings.py
ACCOUNT_FORMS = {'login': 'app.forms.BootstrapLoginForm'}
ACCOUNT_SIGNUP_FORM_CLASS = 'app.forms.BootstrapSignupForm'
But if I only keep one of them, it works. Why is it not possible to override many of allauth forms at the same time ? Is there a workaround ? What is the googd practice to change AllAuth theme ? Is there a easy way to set up bootstrap ?