Source code for tally_system.apps.tally.forms.login_form
from django.contrib.auth.forms import AuthenticationForm
[docs]class LoginForm(AuthenticationForm):
def __init__(self, *args, **kwargs):
super(LoginForm, self).__init__(*args, **kwargs)
self.fields['username'].widget.attrs['autofocus'] = 'on'