auth.backends.ModelBackend.authenticate()

authenticate(username=None, password=None, **kwargs) Tries to authenticate username with password by calling User.check_password. If no username is provided, it tries to fetch a username from kwargs using the key CustomUser.USERNAME_FIELD. Returns an authenticated user or None.

auth.backends.ModelBackend

class ModelBackend This is the default authentication backend used by Django. It authenticates using credentials consisting of a user identifier and password. For Django’s default user model, the user identifier is the username, for custom user models it is the field specified by USERNAME_FIELD (see Customizing Users and authentication). It also handles the default permissions model as defined for User and PermissionsMixin. has_perm(), get_all_permissions(), get_user_permissions(), and get_g

auth.backends.AllowAllUsersRemoteUserBackend

class AllowAllUsersRemoteUserBackend New in Django 1.10. Same as RemoteUserBackend except that it doesn’t reject inactive users because user_can_authenticate always returns True.

auth.backends.AllowAllUsersModelBackend

class AllowAllUsersModelBackend New in Django 1.10. Same as ModelBackend except that it doesn’t reject inactive users because user_can_authenticate() always returns True. When using this backend, you’ll likely want to customize the AuthenticationForm used by the login() view by overriding the confirm_login_allowed() method as it rejects inactive users.

auth.authenticate()

authenticate(**credentials) [source] Use authenticate() to verify a set of credentials. It takes credentials as keyword arguments, username and password for the default case, checks them against each authentication backend, and returns a User object if the credentials are valid for a backend. If the credentials aren’t valid for any backend or if a backend raises PermissionDenied, it returns None. For example: from django.contrib.auth import authenticate user = authenticate(username='john', p

apps.apps.ready

apps.ready Boolean attribute that is set to True after the registry is fully populated and all AppConfig.ready() methods are called.

apps.apps.is_installed()

apps.is_installed(app_name) Checks whether an application with the given name exists in the registry. app_name is the full name of the app, e.g. 'django.contrib.admin'.

apps.apps.get_model()

apps.get_model(app_label, model_name) Returns the Model with the given app_label and model_name. As a shortcut, this method also accepts a single argument in the form app_label.model_name. model_name is case-insensitive. Raises LookupError if no such application or model exists. Raises ValueError when called with a single argument that doesn’t contain exactly one dot.

apps.apps.get_app_configs()

apps.get_app_configs() Returns an iterable of AppConfig instances.

apps.apps.get_app_config()

apps.get_app_config(app_label) Returns an AppConfig for the application with the given app_label. Raises LookupError if no such application exists.