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

Method __init__

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

Source from the content-addressed store, hash-verified

287 field_classes = {"username": UsernameField}
288
289 def __init__(self, *args, **kwargs):
290 super().__init__(*args, **kwargs)
291 password = self.fields.get("password")
292 if password:
293 if self.instance and not self.instance.has_usable_password():
294 password.help_text = _(
295 "Enable password-based authentication for this user by setting a "
296 "password."
297 )
298 user_permissions = self.fields.get("user_permissions")
299 if user_permissions:
300 user_permissions.queryset = user_permissions.queryset.select_related(
301 "content_type"
302 )
303
304
305class AuthenticationForm(forms.Form):

Callers 6

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 3

has_usable_passwordMethod · 0.80
select_relatedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected