new apps/dashboard/wallet.html for stripe payment integration and user's consumables; nav added to _footer.html & also dynamic copyright year with django now Y template; new apps.dash.tests ITs & UTs reflect new wallet functionality in .urls & .views
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from django.core.exceptions import ValidationError
|
||||
from .models import Token, User
|
||||
from .models import LoginToken, User
|
||||
|
||||
|
||||
class PasswordlessAuthenticationBackend:
|
||||
@@ -7,13 +7,13 @@ class PasswordlessAuthenticationBackend:
|
||||
if uid is None:
|
||||
return None
|
||||
try:
|
||||
token = Token.objects.get(uid=uid)
|
||||
except (Token.DoesNotExist, ValidationError):
|
||||
login_token = LoginToken.objects.get(uid=uid)
|
||||
except (LoginToken.DoesNotExist, ValidationError):
|
||||
return None
|
||||
try:
|
||||
return User.objects.get(email=token.email)
|
||||
return User.objects.get(email=login_token.email)
|
||||
except User.DoesNotExist:
|
||||
return User.objects.create_user(email=token.email)
|
||||
return User.objects.create_user(email=login_token.email)
|
||||
|
||||
def get_user(self, user_id):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user