Render 'wait_confirmation' template after resending confirmation sms
This commit is contained in:
parent
d9d02a241b
commit
5ef6d1910c
|
@ -108,7 +108,6 @@ def register(request):
|
||||||
helper = Helper.objects.filter(phone=form.cleaned_data["phone"]).first()
|
helper = Helper.objects.filter(phone=form.cleaned_data["phone"]).first()
|
||||||
if helper:
|
if helper:
|
||||||
token = helper.logintoken_set.first()
|
token = helper.logintoken_set.first()
|
||||||
# todo: resend login link after x minutes?
|
|
||||||
messages.add_message(
|
messages.add_message(
|
||||||
request,
|
request,
|
||||||
messages.INFO,
|
messages.INFO,
|
||||||
|
@ -125,7 +124,7 @@ def register(request):
|
||||||
- datetime.timedelta(minutes=math.pow(10, token.send_count))
|
- datetime.timedelta(minutes=math.pow(10, token.send_count))
|
||||||
):
|
):
|
||||||
token.send()
|
token.send()
|
||||||
return render(request, "register.html", context)
|
return render(request, "wait_confirmation.html", context)
|
||||||
|
|
||||||
helper = Helper(
|
helper = Helper(
|
||||||
name=form.cleaned_data["name"], phone=form.cleaned_data["phone"]
|
name=form.cleaned_data["name"], phone=form.cleaned_data["phone"]
|
||||||
|
|
Loading…
Reference in New Issue