|
|
|
@ -11,6 +11,7 @@ from django.utils.decorators import method_decorator |
|
|
|
from django.views.decorators.csrf import csrf_exempt |
|
|
|
from django.views.decorators.csrf import csrf_exempt |
|
|
|
from django.views.generic import FormView, View |
|
|
|
from django.views.generic import FormView, View |
|
|
|
from django.views.generic.edit import BaseFormView |
|
|
|
from django.views.generic.edit import BaseFormView |
|
|
|
|
|
|
|
from django.shortcuts import redirect |
|
|
|
|
|
|
|
|
|
|
|
from apps.notification.utils import send_email |
|
|
|
from apps.notification.utils import send_email |
|
|
|
from .forms import LearnerRegistrationForm |
|
|
|
from .forms import LearnerRegistrationForm |
|
|
|
@ -56,9 +57,9 @@ class LearnerRegistrationView(FormView): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class LogoutView(View): |
|
|
|
class LogoutView(View): |
|
|
|
def post(self, request, *args, **kwargs): |
|
|
|
def get(self, request, *args, **kwargs): |
|
|
|
logout(request) |
|
|
|
logout(request) |
|
|
|
return JsonResponse({"success": True}) |
|
|
|
return redirect('/') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class LoginView(FormView): |
|
|
|
class LoginView(FormView): |
|
|
|
|