mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-26 18:48:42 +02:00
initial commit
This commit is contained in:
23
app/apps/users/views.py
Normal file
23
app/apps/users/views.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from django.contrib.auth import logout
|
||||
from django.contrib.auth.views import (
|
||||
LoginView,
|
||||
)
|
||||
from django.shortcuts import redirect, render
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
from apps.users.forms import (
|
||||
LoginForm,
|
||||
EmailLoginForm,
|
||||
)
|
||||
|
||||
|
||||
def logout_view(request):
|
||||
logout(request)
|
||||
return redirect(reverse("inicio"))
|
||||
|
||||
|
||||
class UserLoginView(LoginView):
|
||||
form_class = LoginForm
|
||||
# template_name = "users/login.html"
|
||||
redirect_authenticated_user = True
|
||||
Reference in New Issue
Block a user