Commit 42b2939d authored by Okhin's avatar Okhin
Browse files

Close #31 - disabling the validation by email to add a case

parent 8de6ed62
......@@ -150,8 +150,9 @@ class AddForm(FormView):
success_url = '/'
def form_valid(self, form):
msg=_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nPlease note that reports are moderated, it might take some time before your report appears online. Thank you for your patience.")
actid=sendverifymail('activate?key=',form.cleaned_data['email'], msg)
#msg=_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nPlease note that reports are moderated, it might take some time before your report appears online. Thank you for your patience.")
#actid=sendverifymail('activate?key=',form.cleaned_data['email'], msg)
actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest()
operator, created = Operator.objects.get_or_create(name=form.cleaned_data['operator'])
v=Violation(
country = form.cleaned_data['country'],
......@@ -169,8 +170,8 @@ class AddForm(FormView):
old = False
)
v.save()
#c=Confirmation(key='', email=form.cleaned_data['email'], violation=v)
#c.save()
conf=Confirmation(key=actid, email=form.cleaned_data['email'], violation=v)
conf.save()
c = Comment(
comment=form.cleaned_data['comment'],
submitter_email=form.cleaned_data['email'],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment