|
1
|
from django import forms |
|
2
|
from django.contrib.auth.forms import AuthenticationForm |
|
3
|
|
|
4
|
|
|
5
|
class LoginForm(AuthenticationForm): |
|
6
|
username = forms.CharField( |
|
7
|
widget=forms.TextInput( |
|
8
|
attrs={ |
|
9
|
"class": "w-full rounded-md border-gray-300 shadow-sm focus:border-brand focus:ring-brand", |
|
10
|
"placeholder": "Username", |
|
11
|
"autofocus": True, |
|
12
|
} |
|
13
|
) |
|
14
|
) |
|
15
|
password = forms.CharField( |
|
16
|
widget=forms.PasswordInput( |
|
17
|
attrs={ |
|
18
|
"class": "w-full rounded-md border-gray-300 shadow-sm focus:border-brand focus:ring-brand", |
|
19
|
"placeholder": "Password", |
|
20
|
} |
|
21
|
) |
|
22
|
) |
|
23
|
|