aboutsummaryrefslogtreecommitdiffstats
path: root/alphabetlearning/payments/views.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-12-03 17:27:18 +0000
committerMatthew Lemon <y@yulqen.org>2024-12-03 17:27:18 +0000
commit4b21e3889e8337fa5bc9e58cdfc61a9f2019adc9 (patch)
tree2ecfaa0537d3fe875214934d82b31357ed769ea7 /alphabetlearning/payments/views.py
parent3bcd728b0bd37c95865205a75ffbddfb2e086f90 (diff)
Better handling of email verification
Diffstat (limited to 'alphabetlearning/payments/views.py')
-rw-r--r--alphabetlearning/payments/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/alphabetlearning/payments/views.py b/alphabetlearning/payments/views.py
index 9691a9f..bf4c3c9 100644
--- a/alphabetlearning/payments/views.py
+++ b/alphabetlearning/payments/views.py
@@ -15,7 +15,7 @@ from django.views.generic import DeleteView
from django.views.generic import TemplateView
from alphabetlearning.payments.models import EmailSignup
-from alphabetlearning.payments.models import PendingEmailVerification
+from alphabetlearning.payments.models import EmailVerification
from alphabetlearning.resources.models import Resource
from alphabetlearning.users.models import User
@@ -59,7 +59,7 @@ def email_signup_verification(request):
email = request.POST.get("email")
# Create pending verification
- pending_verification = PendingEmailVerification.objects.create(
+ pending_verification = EmailVerification.objects.create(
email=email,
)
@@ -97,7 +97,7 @@ def email_signup_verification(request):
def verify_email(request, token):
try:
- pending = PendingEmailVerification.objects.get(
+ pending = EmailVerification.objects.get(
verification_token=token,
is_verified=False
)
@@ -113,7 +113,7 @@ def verify_email(request, token):
return render(request, 'payments/verification_success.html')
- except PendingEmailVerification.DoesNotExist:
+ except EmailVerification.DoesNotExist:
return render(request, 'payments/verification_failed.html')