lemoncurry/lemonauth/views.py

14 lines
465 B
Python
Raw Permalink Normal View History

from django.contrib.auth import views as auth_views
from otp_agents.forms import OTPAuthenticationForm
from lemoncurry import breadcrumbs
breadcrumbs.add(route='lemonauth:login', label='log in', parent='home:index')
login = auth_views.LoginView.as_view(
2017-10-24 10:25:03 -04:00
authentication_form=OTPAuthenticationForm,
extra_context={'title': 'log in'},
template_name='lemonauth/login.html',
redirect_authenticated_user=True,
)
logout = auth_views.LogoutView.as_view()