mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Login view doc
This commit is contained in:
@@ -8,7 +8,8 @@ from django.contrib.auth import login as auth_login
|
|||||||
|
|
||||||
class AuthenticationForm(BaseAuthenticationForm):
|
class AuthenticationForm(BaseAuthenticationForm):
|
||||||
"""
|
"""
|
||||||
The login form.
|
The login form, providing an email and password field. The
|
||||||
|
form does already implement validation for correct user data.
|
||||||
"""
|
"""
|
||||||
email = forms.EmailField(label=_("E-mail address"), max_length=254)
|
email = forms.EmailField(label=_("E-mail address"), max_length=254)
|
||||||
password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
|
password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
|
||||||
@@ -43,6 +44,10 @@ class AuthenticationForm(BaseAuthenticationForm):
|
|||||||
|
|
||||||
|
|
||||||
def login(request):
|
def login(request):
|
||||||
|
"""
|
||||||
|
Render and process a most basic login form. Takes an URL as GET
|
||||||
|
parameter "next" for redirection after successful login
|
||||||
|
"""
|
||||||
ctx = {}
|
ctx = {}
|
||||||
if request.user.is_authenticated():
|
if request.user.is_authenticated():
|
||||||
if "next" in request.GET:
|
if "next" in request.GET:
|
||||||
|
|||||||
Reference in New Issue
Block a user