During user registration I'm calling some custom function :
def user_created(sender, user, request, **kwargs):
form = ExtendedRegistrationForm(validateemail=True, request.POST, request.FILES)
When requesting a form I need to give additional bool argument validateemail. This though give me error :
Exception Type: SyntaxError at /
Exception Value: ('non-keyword arg after keyword arg', ('/home/myapp/regbackend.py', 59, None, 'form = ExtendedRegistrationForm(dontvalidateemail=True, request.POST, request.FILES)\n'))
What am I doing wrong ? Also if I'd like to use this argument in my form, do I need to add a custom init method? Like :
def __init__(self, *args, **kwargs):
try:
validate = args['validate']
except:
pass
if not validate:
validate = False
super(ExtendedRegistrationForm, self).__init__(*args, **kwargs)