Skip to content

Commit

Permalink
Add missing socialaccount view
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianaElena committed Sep 10, 2024
1 parent a861c08 commit e63ca76
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions comptest/web/views/socialaccount.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from allauth.account.views import LoginView
from django.conf import settings
from django.http import HttpResponse


class CustomLoginView(LoginView):
def dispatch(self, request, *args, **kwargs):
if settings.CHALLENGE_STATE != "RUNNING":
return HttpResponse(
"Challenge hasn't started, so login is not available", status=400
)

return super().dispatch(request, *args, **kwargs)

0 comments on commit e63ca76

Please sign in to comment.