forms.py 495 B

123456789101112131415
  1. from django.contrib.auth.forms import AuthenticationForm
  2. from .models import SharixUser
  3. from django import forms
  4. class LoginUserForm(AuthenticationForm):
  5. password = forms.CharField(label="Пароль",
  6. widget=forms.PasswordInput(attrs={'class':'form-control'}))
  7. username = forms.CharField(label="Номер телефона",
  8. widget=forms.TextInput(attrs={'class':'form-control'}))
  9. class Meta:
  10. model = SharixUser
  11. fields = ['username', 'password']