Settings¶
django-nopassword settings¶
-
django.conf.settings.NOPASSWORD_LOGIN_CODE_TIMEOUT¶ Default:
900Defines how long a login code is valid in seconds.
-
django.conf.settings.NOPASSWORD_NAMESPACE¶ Default:
'nopassword'Defines the namespace for the urls, this must match the namespace of the include of nopassword.urls.
-
django.conf.settings.NOPASSWORD_HIDE_USERNAME¶ Default:
FalseIf set to True, the login url will not contain the username.
-
django.conf.settings.NOPASSWORD_LOGIN_EMAIL_SUBJECT¶ Default:
_('Login code')Sets Email Subject for Login Emails.
-
django.conf.settings.NOPASSWORD_HASH_ALGORITHM¶ Default:
'sha256'Set the algorithm for used in logincode generation. Possible values are those who are supported in hashlib. The value should be set as the name of the attribute in hashlib. Example hashlib.sha256() would be `NOPASSWORD_HASH_ALGORITHM = ‘sha256’.
-
django.conf.settings.NOPASSWORD_POST_REDIRECT¶ Default:
TrueBy default, the login code url requires a POST request to authenticate the user. A GET request renders
registration/login_submit.html, which contains some Javascript that automatically performs the POST on page load. To authenticate directly inside the initial GET request instead, set this toFalse.
-
django.conf.settings.NOPASSWORD_CODE_LENGTH¶ Default:
20The length of the code used to log people in.
-
django.conf.settings.NOPASSWORD_TWILIO_SID¶ Account ID for Twilio.
-
django.conf.settings.NOPASSWORD_TWILIO_AUTH_TOKEN¶ Account secret for Twilio
-
django.conf.settings.NOPASSWORD_NUMERIC_CODES¶ Default:
FalseA boolean flag if set to True, codes will contain numeric characters only (0-9).
Django settings used in django-nopassword¶
-
django.conf.settings.SERVER_URL¶ Default:
'example.com'By default,
nopassword.views.loginpasses the result ofresult.get_host()toLoginCode.send_login_codeto build the login URL. If you write your own view and/or want to avoid this behavior by not passing a value for host, theSERVER_URLsetting will be used instead.
-
django.conf.settings.DEFAULT_FROM_EMAIL¶ Default:
'root@example.com'