/usr/share/doc/python-django-allauth/html/configuration.html is in python-django-allauth-doc 0.35.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Configuration — django-allauth 0.32.0 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.32.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Providers" href="providers.html" />
<link rel="prev" title="Installation" href="installation.html" />
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="providers.html" title="Providers"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">django-allauth 0.32.0 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="configuration">
<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h1>
<p>Available settings:</p>
<dl class="docutils">
<dt>ACCOUNT_ADAPTER (=”allauth.account.adapter.DefaultAccountAdapter”)</dt>
<dd>Specifies the adapter class to use, allowing you to alter certain
default behaviour.</dd>
<dt>ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS (=True)</dt>
<dd><p class="first">The default behaviour is to redirect authenticated users to
<code class="docutils literal"><span class="pre">LOGIN_REDIRECT_URL</span></code> when they try accessing login/signup pages.</p>
<p class="last">By changing this setting to <code class="docutils literal"><span class="pre">False</span></code>, logged in users will not be redirected when
they access login/signup pages.</p>
</dd>
<dt>ACCOUNT_AUTHENTICATION_METHOD (=”username” | “email” | “username_email”)</dt>
<dd>Specifies the login method to use – whether the user logs in by
entering their username, e-mail address, or either one of both.
Setting this to “email” requires ACCOUNT_EMAIL_REQUIRED=True</dd>
<dt>ACCOUNT_CONFIRM_EMAIL_ON_GET (=False)</dt>
<dd>Determines whether or not an e-mail address is automatically confirmed by
a GET request. <a class="reference external" href="http://programmers.stackexchange.com/questions/188860/">GET is not designed to modify the server state</a>, though it is
commonly used for email confirmation. To avoid requiring user interaction,
consider using POST via Javascript in your email confirmation template as
an alternative to setting this to True.</dd>
<dt>ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL (=settings.LOGIN_URL)</dt>
<dd>The URL to redirect to after a successful e-mail confirmation, in case no
user is logged in.</dd>
<dt>ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL (=None)</dt>
<dd>The URL to redirect to after a successful e-mail confirmation, in
case of an authenticated user. Set to <code class="docutils literal"><span class="pre">None</span></code> to use
<code class="docutils literal"><span class="pre">settings.LOGIN_REDIRECT_URL</span></code>.</dd>
<dt>ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS (=3)</dt>
<dd>Determines the expiration date of email confirmation mails (# of days).</dd>
<dt>ACCOUNT_EMAIL_CONFIRMATION_HMAC (=True)</dt>
<dd>In order to verify an email address a key is mailed identifying the
email address to be verified. In previous versions, a record was
stored in the database for each ongoing email confirmation, keeping
track of these keys. Current versions use HMAC based keys that do not
require server side state.</dd>
<dt>ACCOUNT_EMAIL_REQUIRED (=False)</dt>
<dd>The user is required to hand over an e-mail address when signing up.</dd>
<dt>ACCOUNT_EMAIL_VERIFICATION (=”optional”)</dt>
<dd>Determines the e-mail verification method during signup – choose
one of <code class="docutils literal"><span class="pre">"mandatory"</span></code>, <code class="docutils literal"><span class="pre">"optional"</span></code>, or <code class="docutils literal"><span class="pre">"none"</span></code>. When set to
“mandatory” the user is blocked from logging in until the email
address is verified. Choose “optional” or “none” to allow logins
with an unverified e-mail address. In case of “optional”, the e-mail
verification mail is still sent, whereas in case of “none” no e-mail
verification mails are sent.</dd>
<dt>ACCOUNT_EMAIL_SUBJECT_PREFIX (=”[Site] “)</dt>
<dd>Subject-line prefix to use for email messages sent. By default, the
name of the current <code class="docutils literal"><span class="pre">Site</span></code> (<code class="docutils literal"><span class="pre">django.contrib.sites</span></code>) is used.</dd>
<dt>ACCOUNT_DEFAULT_HTTP_PROTOCOL (=”http”)</dt>
<dd>The default protocol used for when generating URLs, e.g. for the
password forgotten procedure. Note that this is a default only –
see the section on HTTPS for more information.</dd>
<dt>ACCOUNT_EMAIL_CONFIRMATION_COOLDOWN (=180)</dt>
<dd>The cooldown period (in seconds) after a confirmation email is sent,
during which further emails are not sent.</dd>
<dt>ACCOUNT_EMAIL_MAX_LENGTH(=254)</dt>
<dd>Maximum length of the email field. You won’t need to alter this unless using
MySQL with the InnoDB storage engine and the <code class="docutils literal"><span class="pre">utf8mb4</span></code> charset, and only in
versions lower than 5.7.7, because the default InnoDB settings don’t allow
indexes bigger than 767 bytes. When using <code class="docutils literal"><span class="pre">utf8mb4</span></code>, characters are 4-bytes
wide, so at maximum column indexes can be 191 characters long (767/4).
Unfortunately Django doesn’t allow specifying index lengths, so the solution
is to reduce the length in characters of indexed text fields.
More information can be found at <a class="reference external" href="https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-conversion.html">MySQL’s documentation on converting between
3-byte and 4-byte Unicode character sets</a>.</dd>
<dt>ACCOUNT_FORMS (={})</dt>
<dd>Used to override forms, for example:
<code class="docutils literal"><span class="pre">{'login':</span> <span class="pre">'myapp.forms.LoginForm'}</span></code></dd>
<dt>ACCOUNT_LOGIN_ATTEMPTS_LIMIT (=5)</dt>
<dd>Number of failed login attempts. When this number is
exceeded, the user is prohibited from logging in for the
specified <code class="docutils literal"><span class="pre">ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT</span></code> seconds. Set to <code class="docutils literal"><span class="pre">None</span></code>
to disable this functionality. Important: while this protects the
allauth login view, it does not protect Django’s admin login from
being brute forced.</dd>
<dt>ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT (=300)</dt>
<dd>Time period, in seconds, from last unsuccessful login attempt, during
which the user is prohibited from trying to log in.</dd>
<dt>ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION (=False)</dt>
<dd><p class="first">The default behaviour is not log users in and to redirect them to
<code class="docutils literal"><span class="pre">ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL</span></code>.</p>
<p class="last">By changing this setting to <code class="docutils literal"><span class="pre">True</span></code>, users will automatically be logged in once
they confirm their email address. Note however that this only works when
confirming the email address <strong>immediately after signing up</strong>, assuming users
didn’t close their browser or used some sort of private browsing mode.</p>
</dd>
<dt>ACCOUNT_LOGOUT_ON_GET (=False)</dt>
<dd>Determines whether or not the user is automatically logged out by a
GET request. <a class="reference external" href="http://programmers.stackexchange.com/questions/188860/">GET is not designed to modify the server state</a>,
and in this case it can be dangerous. See <a class="reference external" href="http://django-allauth.readthedocs.io/en/latest/views.html#logout">LogoutView in the
documentation</a>
for details.</dd>
<dt>ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE (=False)</dt>
<dd>Determines whether or not the user is automatically logged out after
changing or setting their password. See documentation for
<a class="reference external" href="https://docs.djangoproject.com/en/1.8/topics/auth/default/#session-invalidation-on-password-change">Django’s session invalidation on password change</a>.</dd>
<dt>ACCOUNT_LOGIN_ON_PASSWORD_RESET (=False)</dt>
<dd>By changing this setting to <code class="docutils literal"><span class="pre">True</span></code>, users will automatically be logged in
once they have reset their password. By default they are redirected to the
password reset done page.</dd>
<dt>ACCOUNT_LOGOUT_REDIRECT_URL (=”/”)</dt>
<dd>The URL (or URL name) to return to after the user logs out. This is
the counterpart to Django’s <code class="docutils literal"><span class="pre">LOGIN_REDIRECT_URL</span></code>.</dd>
<dt>ACCOUNT_PASSWORD_INPUT_RENDER_VALUE (=False)</dt>
<dd><code class="docutils literal"><span class="pre">render_value</span></code> parameter as passed to <code class="docutils literal"><span class="pre">PasswordInput</span></code> fields.</dd>
<dt>ACCOUNT_PRESERVE_USERNAME_CASING (=True)</dt>
<dd>This setting determines whether the username is stored in lowercase
(<code class="docutils literal"><span class="pre">False</span></code>) or whether its casing is to be preserved (<code class="docutils literal"><span class="pre">True</span></code>). Note that when
casing is preserved, potentially expensive <code class="docutils literal"><span class="pre">__iexact</span></code> lookups are performed
when filter on username. For now, the default is set to <code class="docutils literal"><span class="pre">True</span></code> to maintain
backwards compatibility.</dd>
<dt>ACCOUNT_SESSION_REMEMBER (=None)</dt>
<dd>Controls the life time of the session. Set to <code class="docutils literal"><span class="pre">None</span></code> to ask the user
(“Remember me?”), <code class="docutils literal"><span class="pre">False</span></code> to not remember, and <code class="docutils literal"><span class="pre">True</span></code> to always
remember.</dd>
<dt>ACCOUNT_SIGNUP_EMAIL_ENTER_TWICE (=False)</dt>
<dd>When signing up, let the user type in their email address twice to avoid
typo’s.</dd>
<dt>ACCOUNT_SIGNUP_FORM_CLASS (=None)</dt>
<dd>A string pointing to a custom form class
(e.g. ‘myapp.forms.SignupForm’) that is used during signup to ask
the user for additional input (e.g. newsletter signup, birth
date). This class should implement a <code class="docutils literal"><span class="pre">def</span> <span class="pre">signup(self,</span> <span class="pre">request,</span> <span class="pre">user)</span></code>
method, where user represents the newly signed up user.</dd>
<dt>ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE (=True)</dt>
<dd>When signing up, let the user type in their password twice to avoid typos.</dd>
<dt>ACCOUNT_TEMPLATE_EXTENSION (=”html”)</dt>
<dd>A string defining the template extension to use, defaults to <code class="docutils literal"><span class="pre">html</span></code>.</dd>
<dt>ACCOUNT_USERNAME_BLACKLIST (=[])</dt>
<dd>A list of usernames that can’t be used by user.</dd>
<dt>ACCOUNT_UNIQUE_EMAIL (=True)</dt>
<dd>Enforce uniqueness of e-mail addresses. The <code class="docutils literal"><span class="pre">emailaddress.email</span></code>
model field is set to <code class="docutils literal"><span class="pre">UNIQUE</span></code>. Forms prevent a user from registering
with or adding an additional email address if that email address is
in use by another account.</dd>
<dt>ACCOUNT_USER_DISPLAY (=a callable returning <code class="docutils literal"><span class="pre">user.username</span></code>)</dt>
<dd>A callable (or string of the form <code class="docutils literal"><span class="pre">'some.module.callable_name'</span></code>)
that takes a user as its only argument and returns the display name
of the user. The default implementation returns <code class="docutils literal"><span class="pre">user.username</span></code>.</dd>
<dt>ACCOUNT_USER_MODEL_EMAIL_FIELD (=”email”)</dt>
<dd>The name of the field containing the <code class="docutils literal"><span class="pre">email</span></code>, if any. See custom
user models.</dd>
<dt>ACCOUNT_USER_MODEL_USERNAME_FIELD (=”username”)</dt>
<dd>The name of the field containing the <code class="docutils literal"><span class="pre">username</span></code>, if any. See custom
user models.</dd>
<dt>ACCOUNT_USERNAME_MIN_LENGTH (=1)</dt>
<dd>An integer specifying the minimum allowed length of a username.</dd>
<dt>ACCOUNT_USERNAME_REQUIRED (=True)</dt>
<dd>The user is required to enter a username when signing up. Note that
the user will be asked to do so even if
<code class="docutils literal"><span class="pre">ACCOUNT_AUTHENTICATION_METHOD</span></code> is set to <code class="docutils literal"><span class="pre">email</span></code>. Set to <code class="docutils literal"><span class="pre">False</span></code>
when you do not wish to prompt the user to enter a username.</dd>
<dt>ACCOUNT_USERNAME_VALIDATORS (=None)</dt>
<dd><p class="first">A path
(<code class="docutils literal"><span class="pre">'some.module.validators.custom_username_validators'</span></code>) to a list of
custom username validators. If left unset, the validators setup
within the user model username field are used.</p>
<p>Example:</p>
<div class="last highlight-default"><div class="highlight"><pre><span></span><span class="c1"># In validators.py</span>
<span class="kn">from</span> <span class="nn">django.contrib.auth.validators</span> <span class="k">import</span> <span class="n">ASCIIUsernameValidator</span>
<span class="n">custom_username_validators</span> <span class="o">=</span> <span class="p">[</span><span class="n">ASCIIUsernameValidator</span><span class="p">()]</span>
<span class="c1"># In settings.py</span>
<span class="n">ACCOUNT_USERNAME_VALIDATORS</span> <span class="o">=</span> <span class="s1">'some.module.validators.custom_username_validators'</span>
</pre></div>
</div>
</dd>
<dt>SOCIALACCOUNT_ADAPTER (=”allauth.socialaccount.adapter.DefaultSocialAccountAdapter”)</dt>
<dd>Specifies the adapter class to use, allowing you to alter certain
default behaviour.</dd>
<dt>SOCIALACCOUNT_AUTO_SIGNUP (=True)</dt>
<dd>Attempt to bypass the signup form by using fields (e.g. username,
email) retrieved from the social account provider. If a conflict
arises due to a duplicate e-mail address the signup form will still
kick in.</dd>
<dt>SOCIALACCOUNT_EMAIL_VERIFICATION (=ACCOUNT_EMAIL_VERIFICATION)</dt>
<dd>As <code class="docutils literal"><span class="pre">ACCOUNT_EMAIL_VERIFICATION</span></code>, but for social accounts.</dd>
<dt>SOCIALACCOUNT_EMAIL_REQUIRED (=ACCOUNT_EMAIL_REQUIRED)</dt>
<dd>The user is required to hand over an e-mail address when signing up
using a social account.</dd>
<dt>SOCIALACCOUNT_FORMS (={})</dt>
<dd>Used to override forms, for example:
<code class="docutils literal"><span class="pre">{'signup':</span> <span class="pre">'myapp.forms.SignupForm'}</span></code></dd>
<dt>SOCIALACCOUNT_PROVIDERS (= dict)</dt>
<dd>Dictionary containing provider specific settings.</dd>
<dt>SOCIALACCOUNT_QUERY_EMAIL (=ACCOUNT_EMAIL_REQUIRED)</dt>
<dd>Request e-mail address from 3rd party account provider? E.g. using
OpenID AX, or the Facebook “email” permission.</dd>
<dt>SOCIALACCOUNT_STORE_TOKENS (=True)</dt>
<dd>Indicates whether or not the access tokens are stored in the database.</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="installation.html"
title="previous chapter">Installation</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="providers.html"
title="next chapter">Providers</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/configuration.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="providers.html" title="Providers"
>next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">django-allauth 0.32.0 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2018, Raymond Penners.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
</div>
</body>
</html>
|