17 lines
534 B
Python
17 lines
534 B
Python
from django import forms
|
||
from django.contrib.auth import get_user_model
|
||
from django.contrib.auth.forms import UserCreationForm
|
||
|
||
|
||
class LoginForm(forms.Form):
|
||
username = forms.CharField(max_length=63, label='Nom d’utilisateur')
|
||
password = forms.CharField(max_length=63,
|
||
widget=forms.PasswordInput,
|
||
label='Mot de passe')
|
||
|
||
|
||
class RegisterForm(UserCreationForm):
|
||
class Meta(UserCreationForm.Meta):
|
||
model = get_user_model()
|
||
fields = ('username',)
|