feat: login view
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from .login import *
|
||||
from .register import *
|
||||
from .reset_password import *
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
from django.utils.text import gettext_lazy as _
|
||||
from django import forms
|
||||
from django.contrib.auth.forms import AuthenticationForm, UsernameField
|
||||
|
||||
|
||||
class LoginForm(AuthenticationForm):
|
||||
username = UsernameField(
|
||||
widget=forms.TextInput(
|
||||
attrs={
|
||||
"autofocus": True,
|
||||
"class": "bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600"
|
||||
"focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600"
|
||||
"dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
|
||||
}
|
||||
)
|
||||
)
|
||||
password = forms.CharField(
|
||||
label=_("Password"),
|
||||
strip=False,
|
||||
widget=forms.PasswordInput(
|
||||
attrs={
|
||||
"autocomplete": "current-password",
|
||||
"class": "bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 "
|
||||
"focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 "
|
||||
"dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
|
||||
}
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user