File: settings.rst

package info (click to toggle)
python-django-registration 3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 704 kB
  • sloc: python: 1,503; makefile: 86
file content (59 lines) | stat: -rw-r--r-- 1,834 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.. _settings:
.. module:: django.conf.settings


Custom settings
===============

Although the choice of registration workflow does not necessarily
require changes to your Django settings (as registration workflows are
selected by including the appropriate URL patterns in your root
URLconf), the built-in workflows of django-registration make use
of several custom settings.


.. data:: ACCOUNT_ACTIVATION_DAYS

   An :class:`int` indicating how long (in days) after signup an
   account has in which to activate.

   Used by:

   * :ref:`The two-step activation workflow <activation-workflow>`


.. data:: REGISTRATION_OPEN

   A :class:`bool` indicating whether registration of new accounts is
   currently permitted.

   A default of `True` is assumed when this setting is not supplied,
   so specifying it is optional unless you want to temporarily close
   registration (in which case, set it to `False`).

   Used by: 

   * :ref:`The two-step activation workflow <activation-workflow>`

   * :ref:`The one-step workflow <one-step-workflow>`

   Third-party workflows wishing to use an alternate method of
   determining whether registration is allowed should subclass
   :class:`django_registration.views.RegistrationView` (or a subclass of it
   from an existing workflow) and override
   :meth:`~django_registration.views.RegistrationView.registration_allowed`.


.. data:: REGISTRATION_SALT

   A :class:`str` used as an additional "salt" in the process of
   generating signed activation keys.

   This setting is optional, and a default of `"registration"` will
   be used if not specified. The value of this setting does not need
   to be kept secret; see :ref:`the note about this salt value and
   security <salt-security>` for details.

   Used by:

   * :ref:`The two-step activation workflow <activation-workflow>`