trying to fix problem with captcha

remotes/origin/ESHOP_fix_problem_with_registration
FUNNYDMAN 7 years ago
parent af65dbc7ba
commit a19a96eac6
  1. 4
      eshop/accounts_ext/views.py

@ -92,7 +92,6 @@ class RegistrationView(RegistrationViewBase):
context = super().get_context_data(**kwargs)
context['company_form'] = self.company_form
context['title'] = RegistrationForm.title
context['captcha'] = RegistrationForm.captcha
return context
def post(self, request, *args, **kwargs):
@ -107,9 +106,6 @@ class RegistrationView(RegistrationViewBase):
new_user = self.register(form)
context = self.get_context_data()
company_form = context.get('company_form')
captcha = context.get('captcha')
if captcha is None:
return self.form_invalid(form=form)
try:
if company_form.is_valid():
company_form.save(user=new_user)

Loading…
Cancel
Save