This file is indexed.

/usr/share/doc/python-django-allauth/html/templates.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
<!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>Templates &#8212; 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="Decorators" href="decorators.html" />
    <link rel="prev" title="Views" href="views.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="decorators.html" title="Decorators"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="views.html" title="Views"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">django-allauth 0.32.0 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="templates">
<h1>Templates<a class="headerlink" href="#templates" title="Permalink to this headline"></a></h1>
<div class="section" id="overridable-templates">
<h2>Overridable templates<a class="headerlink" href="#overridable-templates" title="Permalink to this headline"></a></h2>
<p><code class="docutils literal"><span class="pre">allauth</span></code> ships many templates, viewable in the
<a class="reference external" href="https://github.com/pennersr/django-allauth/tree/master/allauth/templates">allauth/templates</a>
directory.</p>
<p>For instance, the view corresponding to the <code class="docutils literal"><span class="pre">account_login</span></code> URL uses the
template <code class="docutils literal"><span class="pre">account/login.html</span></code>. If you create a file with this name in your
code layout, it can override the one shipped with <code class="docutils literal"><span class="pre">allauth</span></code>.</p>
</div>
<div class="section" id="template-tags">
<h2>Template Tags<a class="headerlink" href="#template-tags" title="Permalink to this headline"></a></h2>
<p>The following template tag libraries are available:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">account</span></code>: tags for dealing with accounts in general</li>
<li><code class="docutils literal"><span class="pre">socialaccount</span></code>: tags focused on social accounts</li>
</ul>
<div class="section" id="account-tags">
<h3>Account Tags<a class="headerlink" href="#account-tags" title="Permalink to this headline"></a></h3>
<p>Use <code class="docutils literal"><span class="pre">user_display</span></code> to render a user name without making assumptions on
how the user is represented (e.g. render the username, or first
name?):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span><span class="o">%</span> <span class="n">load</span> <span class="n">account</span> <span class="o">%</span><span class="p">}</span>

<span class="p">{</span><span class="o">%</span> <span class="n">user_display</span> <span class="n">user</span> <span class="o">%</span><span class="p">}</span>
</pre></div>
</div>
<p>Or, if you need to use in a <code class="docutils literal"><span class="pre">{%</span> <span class="pre">blocktrans</span> <span class="pre">%}</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span><span class="o">%</span> <span class="n">load</span> <span class="n">account</span> <span class="o">%</span><span class="p">}</span>

<span class="p">{</span><span class="o">%</span> <span class="n">user_display</span> <span class="n">user</span> <span class="k">as</span> <span class="n">user_display</span> <span class="o">%</span><span class="p">}</span>
<span class="p">{</span><span class="o">%</span> <span class="n">blocktrans</span> <span class="o">%</span><span class="p">}{{</span> <span class="n">user_display</span> <span class="p">}}</span> <span class="n">has</span> <span class="n">logged</span> <span class="ow">in</span><span class="o">...</span><span class="p">{</span><span class="o">%</span> <span class="n">endblocktrans</span> <span class="o">%</span><span class="p">}</span>
</pre></div>
</div>
<p>Then, override the <code class="docutils literal"><span class="pre">ACCOUNT_USER_DISPLAY</span></code> setting with your project
specific user display callable.</p>
</div>
<div class="section" id="social-account-tags">
<h3>Social Account Tags<a class="headerlink" href="#social-account-tags" title="Permalink to this headline"></a></h3>
<p>Use the <code class="docutils literal"><span class="pre">provider_login_url</span></code> tag to generate provider specific login URLs:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span><span class="o">%</span> <span class="n">load</span> <span class="n">socialaccount</span> <span class="o">%</span><span class="p">}</span>

<span class="o">&lt;</span><span class="n">a</span> <span class="n">href</span><span class="o">=</span><span class="s2">&quot;{% provider_login_url &quot;</span><span class="n">openid</span><span class="s2">&quot; openid=&quot;</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">accounts</span><span class="o">/</span><span class="n">o8</span><span class="o">/</span><span class="nb">id</span><span class="s2">&quot; next=&quot;</span><span class="o">/</span><span class="n">success</span><span class="o">/</span><span class="n">url</span><span class="o">/</span><span class="s2">&quot; %}&quot;</span><span class="o">&gt;</span><span class="n">Google</span><span class="o">&lt;/</span><span class="n">a</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="n">a</span> <span class="n">href</span><span class="o">=</span><span class="s2">&quot;{% provider_login_url &quot;</span><span class="n">twitter</span><span class="s2">&quot; %}&quot;</span><span class="o">&gt;</span><span class="n">Twitter</span><span class="o">&lt;/</span><span class="n">a</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Here, you can pass along an optional <code class="docutils literal"><span class="pre">process</span></code> parameter that
indicates how to process the social login. You can choose between
<code class="docutils literal"><span class="pre">login</span></code> and <code class="docutils literal"><span class="pre">connect</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">a</span> <span class="n">href</span><span class="o">=</span><span class="s2">&quot;{% provider_login_url &quot;</span><span class="n">twitter</span><span class="s2">&quot; process=&quot;</span><span class="n">connect</span><span class="s2">&quot; %}&quot;</span><span class="o">&gt;</span><span class="n">Connect</span> <span class="n">a</span> <span class="n">Twitter</span> <span class="n">account</span><span class="o">&lt;/</span><span class="n">a</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Furthermore, you can pass along an <code class="docutils literal"><span class="pre">action</span></code> parameter with value
<code class="docutils literal"><span class="pre">reauthenticate</span></code> to indicate that you want the user to be re-prompted
for authentication even if they already signed in before. For now, this
is supported by Facebook, Google and Twitter only.</p>
<p>For Javascript based logins (e.g. when you enable the Facebook JS
SDK), you will need to make sure that the required Javascript is
loaded. The following tag loads all scripts for the enabled
providers:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span><span class="o">%</span> <span class="n">providers_media_js</span> <span class="o">%</span><span class="p">}</span>
</pre></div>
</div>
<p>For easy access to the social accounts for a user use:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span><span class="o">%</span> <span class="n">get_social_accounts</span> <span class="n">user</span> <span class="k">as</span> <span class="n">accounts</span> <span class="o">%</span><span class="p">}</span>
</pre></div>
</div>
<p>Then:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{{</span><span class="n">accounts</span><span class="o">.</span><span class="n">twitter</span><span class="p">}}</span> <span class="o">--</span> <span class="n">a</span> <span class="nb">list</span> <span class="n">of</span> <span class="n">connected</span> <span class="n">Twitter</span> <span class="n">accounts</span>
<span class="p">{{</span><span class="n">accounts</span><span class="o">.</span><span class="n">twitter</span><span class="o">.</span><span class="mi">0</span><span class="p">}}</span> <span class="o">--</span> <span class="n">the</span> <span class="n">first</span> <span class="n">Twitter</span> <span class="n">account</span>
<span class="p">{</span><span class="o">%</span> <span class="k">if</span> <span class="n">accounts</span> <span class="o">%</span><span class="p">}</span> <span class="o">--</span> <span class="k">if</span> <span class="n">there</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">least</span> <span class="n">one</span> <span class="n">social</span> <span class="n">account</span>
</pre></div>
</div>
<p>Finally, social authentication providers configured for the current site
can be retrieved via:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span><span class="o">%</span> <span class="n">get_providers</span> <span class="k">as</span> <span class="n">socialaccount_providers</span> <span class="o">%</span><span class="p">}</span>
</pre></div>
</div>
<p>Which will populate the <code class="docutils literal"><span class="pre">socialaccount_providers</span></code> variable in the
template context with a list of configured social authentication
providers. This supersedes the context processor used in version 0.21 and
below.</p>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Templates</a><ul>
<li><a class="reference internal" href="#overridable-templates">Overridable templates</a></li>
<li><a class="reference internal" href="#template-tags">Template Tags</a><ul>
<li><a class="reference internal" href="#account-tags">Account Tags</a></li>
<li><a class="reference internal" href="#social-account-tags">Social Account Tags</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="views.html"
                        title="previous chapter">Views</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="decorators.html"
                        title="next chapter">Decorators</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/templates.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="decorators.html" title="Decorators"
             >next</a> |</li>
        <li class="right" >
          <a href="views.html" title="Views"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">django-allauth 0.32.0 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2018, Raymond Penners.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
    </div>
  </body>
</html>