12 lines
312 B
Python
12 lines
312 B
Python
from django.contrib.auth.views import LoginView
|
|
from django.urls import reverse_lazy
|
|
from users.forms import CustomLoginForm
|
|
|
|
|
|
class CustomLoginView(LoginView):
|
|
redirect_authenticated_user = True
|
|
authentication_form = CustomLoginForm
|
|
|
|
def get_success_url(self):
|
|
return reverse_lazy('router')
|