MCPcopy
hub / github.com/django/django / __init__

Method __init__

django/contrib/auth/forms.py:229–234  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

227 field_classes = {"username": UsernameField}
228
229 def __init__(self, *args, **kwargs):
230 super().__init__(*args, **kwargs)
231 if self._meta.model.USERNAME_FIELD in self.fields:
232 self.fields[self._meta.model.USERNAME_FIELD].widget.attrs[
233 "autofocus"
234 ] = True
235
236 def clean(self):
237 self.validate_passwords()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected