Context processors
django-password-policies-iplweb provides a context processor that adds password
related variables to a context:
password_status
- password_policies.context_processors.password_status(request)
Adds a variable determining the state of a user’s password to the context if the user has authenticated:
password_change_requiredDetermines if the user needs to change his/her password.
Set to
Trueif the user has to change his/her password,Falseotherwise.
To use it add it to the list of
TEMPLATE_CONTEXT_PROCESSORSin a project’s settings file:TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.contrib.messages.context_processors.messages', 'password_policies.context_processors.password_status', )