django-allauth-ens/allauth_ens/views.py

26 lines
522 B
Python
Raw Normal View History

import django
from django.views.generic import RedirectView
2017-08-03 12:40:52 +02:00
if django.VERSION >= (1, 10):
from django.urls import reverse_lazy
else:
from django.core.urlresolvers import reverse_lazy
2017-08-03 12:40:52 +02:00
class CaptureLogin(RedirectView):
url = reverse_lazy('account_login')
query_string = True
permanent = False
2017-08-03 12:40:52 +02:00
capture_login = CaptureLogin.as_view()
class CaptureLogout(RedirectView):
url = reverse_lazy('account_logout')
query_string = True
permanent = False
capture_logout = CaptureLogout.as_view()