17 lines
413 B
Python
17 lines
413 B
Python
|
|
from django.contrib.auth import forms
|
||
|
|
|
||
|
|
|
||
|
|
class _AccountFieldStyle:
|
||
|
|
def __init__(self, *args, **kwargs):
|
||
|
|
super().__init__(*args, **kwargs)
|
||
|
|
for field in self.fields.values():
|
||
|
|
field.widget.attrs['class'] = 'form-input'
|
||
|
|
|
||
|
|
|
||
|
|
class AuthenticationForm(_AccountFieldStyle, forms.AuthenticationForm):
|
||
|
|
pass
|
||
|
|
|
||
|
|
|
||
|
|
class PasswordChangeForm(_AccountFieldStyle, forms.PasswordChangeForm):
|
||
|
|
pass
|