| | | |
Offset 46, 15 lines modified | Offset 46, 15 lines modified |
46 | ··<div·class="section"·id="developer-interface"> | 46 | ··<div·class="section"·id="developer-interface"> |
47 | <h1>Developer·Interface<a·class="headerlink"·href="#developer-interface"·title="Permalink·to·this·headline">¶</a></h1> | 47 | <h1>Developer·Interface<a·class="headerlink"·href="#developer-interface"·title="Permalink·to·this·headline">¶</a></h1> |
48 | <div·class="section"·id="module-flask_wtf"> | 48 | <div·class="section"·id="module-flask_wtf"> |
49 | <span·id="forms-and-fields"></span><h2>Forms·and·Fields<a·class="headerlink"·href="#module-flask_wtf"·title="Permalink·to·this·headline">¶</a></h2> | 49 | <span·id="forms-and-fields"></span><h2>Forms·and·Fields<a·class="headerlink"·href="#module-flask_wtf"·title="Permalink·to·this·headline">¶</a></h2> |
50 | <dl·class="class"> | 50 | <dl·class="class"> |
51 | <dt·id="flask_wtf.FlaskForm"> | 51 | <dt·id="flask_wtf.FlaskForm"> |
52 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.</code><code·class="descname">FlaskForm</code><span·class="sig-paren">(</span><em>formdata=<object·object></em>,·<em>**kwargs</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.FlaskForm"·title="Permalink·to·this·definition">¶</a></dt> | 52 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.</code><code·class="descname">FlaskForm</code><span·class="sig-paren">(</span><em>formdata=<object·object></em>,·<em>**kwargs</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.FlaskForm"·title="Permalink·to·this·definition">¶</a></dt> |
53 | <dd><p>Flask-specific·subclass·of·WTForms·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Form</span></code>.</p> | 53 | <dd><p>Flask-specific·subclass·of·WTForms·<a·class="reference·external"·href="https://wtforms.readthedocs.io/en/latest/forms/#wtforms.form.Form"·title="(in·WTForms·v3.0.x)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Form</span></code></a>.</p> |
54 | <p>If·<code·class="docutils·literal·notranslate"><span·class="pre">formdata</span></code>·is·not·specified,·this·will·use·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">flask.request.form</span></code> | 54 | <p>If·<code·class="docutils·literal·notranslate"><span·class="pre">formdata</span></code>·is·not·specified,·this·will·use·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">flask.request.form</span></code> |
55 | and·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">flask.request.files</span></code>.··Explicitly·pass·<code·class="docutils·literal·notranslate"><span·class="pre">formdata=None</span></code>·to | 55 | and·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">flask.request.files</span></code>.··Explicitly·pass·<code·class="docutils·literal·notranslate"><span·class="pre">formdata=None</span></code>·to |
56 | prevent·this.</p> | 56 | prevent·this.</p> |
57 | <dl·class="class"> | 57 | <dl·class="class"> |
58 | <dt·id="flask_wtf.FlaskForm.Meta"> | 58 | <dt·id="flask_wtf.FlaskForm.Meta"> |
59 | <em·class="property">class·</em><code·class="descname">Meta</code><a·class="headerlink"·href="#flask_wtf.FlaskForm.Meta"·title="Permalink·to·this·definition">¶</a></dt> | 59 | <em·class="property">class·</em><code·class="descname">Meta</code><a·class="headerlink"·href="#flask_wtf.FlaskForm.Meta"·title="Permalink·to·this·definition">¶</a></dt> |
60 | <dd><dl·class="method"> | 60 | <dd><dl·class="method"> |
Offset 100, 15 lines modified | Offset 100, 15 lines modified |
100 | </dd></dl> | 100 | </dd></dl> |
| |
101 | <dl·class="method"> | 101 | <dl·class="method"> |
102 | <dt·id="flask_wtf.FlaskForm.hidden_tag"> | 102 | <dt·id="flask_wtf.FlaskForm.hidden_tag"> |
103 | <code·class="descname">hidden_tag</code><span·class="sig-paren">(</span><em>*fields</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.FlaskForm.hidden_tag"·title="Permalink·to·this·definition">¶</a></dt> | 103 | <code·class="descname">hidden_tag</code><span·class="sig-paren">(</span><em>*fields</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.FlaskForm.hidden_tag"·title="Permalink·to·this·definition">¶</a></dt> |
104 | <dd><p>Render·the·form’s·hidden·fields·in·one·call.</p> | 104 | <dd><p>Render·the·form’s·hidden·fields·in·one·call.</p> |
105 | <p>A·field·is·considered·hidden·if·it·uses·the | 105 | <p>A·field·is·considered·hidden·if·it·uses·the |
106 | <code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">HiddenInput</span></code>·widget.</p> | 106 | <a·class="reference·external"·href="https://wtforms.readthedocs.io/en/latest/widgets/#wtforms.widgets.HiddenInput"·title="(in·WTForms·v3.0.x)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">HiddenInput</span></code></a>·widget.</p> |
107 | <p>If·<code·class="docutils·literal·notranslate"><span·class="pre">fields</span></code>·are·given,·only·render·the·given·fields·that | 107 | <p>If·<code·class="docutils·literal·notranslate"><span·class="pre">fields</span></code>·are·given,·only·render·the·given·fields·that |
108 | are·hidden.··If·a·string·is·passed,·render·the·field·with·that | 108 | are·hidden.··If·a·string·is·passed,·render·the·field·with·that |
109 | name·if·it·exists.</p> | 109 | name·if·it·exists.</p> |
110 | <div·class="versionchanged"> | 110 | <div·class="versionchanged"> |
111 | <p><span·class="versionmodified">Changed·in·version·0.13:·</span>No·longer·wraps·inputs·in·hidden·div. | 111 | <p><span·class="versionmodified">Changed·in·version·0.13:·</span>No·longer·wraps·inputs·in·hidden·div. |
112 | This·is·valid·HTML·5.</p> | 112 | This·is·valid·HTML·5.</p> |
113 | </div> | 113 | </div> |
Offset 157, 54 lines modified | Offset 157, 54 lines modified |
157 | <dt·id="flask_wtf.RecaptchaWidget"> | 157 | <dt·id="flask_wtf.RecaptchaWidget"> |
158 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.</code><code·class="descname">RecaptchaWidget</code><a·class="headerlink"·href="#flask_wtf.RecaptchaWidget"·title="Permalink·to·this·definition">¶</a></dt> | 158 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.</code><code·class="descname">RecaptchaWidget</code><a·class="headerlink"·href="#flask_wtf.RecaptchaWidget"·title="Permalink·to·this·definition">¶</a></dt> |
159 | <dd></dd></dl> | 159 | <dd></dd></dl> |
| |
160 | <span·class="target"·id="module-flask_wtf.file"></span><dl·class="class"> | 160 | <span·class="target"·id="module-flask_wtf.file"></span><dl·class="class"> |
161 | <dt·id="flask_wtf.file.FileField"> | 161 | <dt·id="flask_wtf.file.FileField"> |
162 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.file.</code><code·class="descname">FileField</code><span·class="sig-paren">(</span><em>label=None</em>,·<em>validators=None</em>,·<em>filters=()</em>,·<em>description=''</em>,·<em>id=None</em>,·<em>default=None</em>,·<em>widget=None</em>,·<em>render_kw=None</em>,·<em>_form=None</em>,·<em>_name=None</em>,·<em>_prefix=''</em>,·<em>_translations=None</em>,·<em>_meta=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileField"·title="Permalink·to·this·definition">¶</a></dt> | 162 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.file.</code><code·class="descname">FileField</code><span·class="sig-paren">(</span><em>label=None</em>,·<em>validators=None</em>,·<em>filters=()</em>,·<em>description=''</em>,·<em>id=None</em>,·<em>default=None</em>,·<em>widget=None</em>,·<em>render_kw=None</em>,·<em>_form=None</em>,·<em>_name=None</em>,·<em>_prefix=''</em>,·<em>_translations=None</em>,·<em>_meta=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileField"·title="Permalink·to·this·definition">¶</a></dt> |
163 | <dd><p>Werkzeug-aware·subclass·of·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">wtforms.fields.FileField</span></code>.</p> | 163 | <dd><p>Werkzeug-aware·subclass·of·<a·class="reference·external"·href="https://wtforms.readthedocs.io/en/latest/fields/#wtforms.fields.FileField"·title="(in·WTForms·v3.0.x)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">wtforms.fields.FileField</span></code></a>.</p> |
164 | <dl·class="method"> | 164 | <dl·class="method"> |
165 | <dt·id="flask_wtf.file.FileField.has_file"> | 165 | <dt·id="flask_wtf.file.FileField.has_file"> |
166 | <code·class="descname">has_file</code><span·class="sig-paren">(</span><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileField.has_file"·title="Permalink·to·this·definition">¶</a></dt> | 166 | <code·class="descname">has_file</code><span·class="sig-paren">(</span><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileField.has_file"·title="Permalink·to·this·definition">¶</a></dt> |
167 | <dd><p>Return·<code·class="docutils·literal·notranslate"><span·class="pre">True</span></code>·if·<code·class="docutils·literal·notranslate"><span·class="pre">self.data</span></code>·is·a | 167 | <dd><p>Return·<code·class="docutils·literal·notranslate"><span·class="pre">True</span></code>·if·<code·class="docutils·literal·notranslate"><span·class="pre">self.data</span></code>·is·a |
168 | <code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">FileStorage</span></code>·object.</p> | 168 | <a·class="reference·external"·href="https://werkzeug.palletsprojects.com/en/1.0.x/datastructures/#werkzeug.datastructures.FileStorage"·title="(in·Werkzeug·v1.0.x)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">FileStorage</span></code></a>·object.</p> |
169 | <div·class="deprecated"> | 169 | <div·class="deprecated"> |
170 | <p><span·class="versionmodified">Deprecated·since·version·0.14.1:·</span><code·class="docutils·literal·notranslate"><span·class="pre">data</span></code>·is·no·longer·set·if·the·input·is·not·a·non-empty | 170 | <p><span·class="versionmodified">Deprecated·since·version·0.14.1:·</span><code·class="docutils·literal·notranslate"><span·class="pre">data</span></code>·is·no·longer·set·if·the·input·is·not·a·non-empty |
171 | <code·class="docutils·literal·notranslate"><span·class="pre">FileStorage</span></code>.·Check·<code·class="docutils·literal·notranslate"><span·class="pre">form.data</span>·<span·class="pre">is</span>·<span·class="pre">not</span>·<span·class="pre">None</span></code>·instead.</p> | 171 | <code·class="docutils·literal·notranslate"><span·class="pre">FileStorage</span></code>.·Check·<code·class="docutils·literal·notranslate"><span·class="pre">form.data</span>·<span·class="pre">is</span>·<span·class="pre">not</span>·<span·class="pre">None</span></code>·instead.</p> |
172 | </div> | 172 | </div> |
173 | </dd></dl> | 173 | </dd></dl> |
| |
174 | </dd></dl> | 174 | </dd></dl> |
| |
175 | <dl·class="class"> | 175 | <dl·class="class"> |
176 | <dt·id="flask_wtf.file.FileAllowed"> | 176 | <dt·id="flask_wtf.file.FileAllowed"> |
177 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.file.</code><code·class="descname">FileAllowed</code><span·class="sig-paren">(</span><em>upload_set</em>,·<em>message=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileAllowed"·title="Permalink·to·this·definition">¶</a></dt> | 177 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.file.</code><code·class="descname">FileAllowed</code><span·class="sig-paren">(</span><em>upload_set</em>,·<em>message=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileAllowed"·title="Permalink·to·this·definition">¶</a></dt> |
178 | <dd><p>Validates·that·the·uploaded·file·is·allowed·by·a·given·list·of | 178 | <dd><p>Validates·that·the·uploaded·file·is·allowed·by·a·given·list·of |
179 | extensions·or·a·Flask-Uploads·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">UploadSet</span></code>.</p> | 179 | extensions·or·a·Flask-Uploads·<a·class="reference·external"·href="https://pythonhosted.org/Flask-Uploads/index.html#flaskext.uploads.UploadSet"·title="(in·Flask-Uploads·v0.1)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">UploadSet</span></code></a>.</p> |
180 | <table·class="docutils·field-list"·frame="void"·rules="none"> | 180 | <table·class="docutils·field-list"·frame="void"·rules="none"> |
181 | <col·class="field-name"·/> | 181 | <col·class="field-name"·/> |
182 | <col·class="field-body"·/> | 182 | <col·class="field-body"·/> |
183 | <tbody·valign="top"> | 183 | <tbody·valign="top"> |
184 | <tr·class="field-odd·field"><th·class="field-name">Parameters:</th><td·class="field-body"><ul·class="first·last·simple"> | 184 | <tr·class="field-odd·field"><th·class="field-name">Parameters:</th><td·class="field-body"><ul·class="first·last·simple"> |
185 | <li><strong>upload_set</strong>·–·A·list·of·extensions·or·an | 185 | <li><strong>upload_set</strong>·–·A·list·of·extensions·or·an |
186 | <code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">UploadSet</span></code></li> | 186 | <a·class="reference·external"·href="https://pythonhosted.org/Flask-Uploads/index.html#flaskext.uploads.UploadSet"·title="(in·Flask-Uploads·v0.1)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">UploadSet</span></code></a></li> |
187 | <li><strong>message</strong>·–·error·message</li> | 187 | <li><strong>message</strong>·–·error·message</li> |
188 | </ul> | 188 | </ul> |
189 | </td> | 189 | </td> |
190 | </tr> | 190 | </tr> |
191 | </tbody> | 191 | </tbody> |
192 | </table> | 192 | </table> |
193 | <p>You·can·also·use·the·synonym·<code·class="docutils·literal·notranslate"><span·class="pre">file_allowed</span></code>.</p> | 193 | <p>You·can·also·use·the·synonym·<code·class="docutils·literal·notranslate"><span·class="pre">file_allowed</span></code>.</p> |
194 | </dd></dl> | 194 | </dd></dl> |
| |
195 | <dl·class="class"> | 195 | <dl·class="class"> |
196 | <dt·id="flask_wtf.file.FileRequired"> | 196 | <dt·id="flask_wtf.file.FileRequired"> |
197 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.file.</code><code·class="descname">FileRequired</code><span·class="sig-paren">(</span><em>message=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileRequired"·title="Permalink·to·this·definition">¶</a></dt> | 197 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.file.</code><code·class="descname">FileRequired</code><span·class="sig-paren">(</span><em>message=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.file.FileRequired"·title="Permalink·to·this·definition">¶</a></dt> |
198 | <dd><p>Validates·that·the·data·is·a·Werkzeug | 198 | <dd><p>Validates·that·the·data·is·a·Werkzeug |
199 | <code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">FileStorage</span></code>·object.</p> | 199 | <a·class="reference·external"·href="https://werkzeug.palletsprojects.com/en/1.0.x/datastructures/#werkzeug.datastructures.FileStorage"·title="(in·Werkzeug·v1.0.x)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">FileStorage</span></code></a>·object.</p> |
200 | <table·class="docutils·field-list"·frame="void"·rules="none"> | 200 | <table·class="docutils·field-list"·frame="void"·rules="none"> |
201 | <col·class="field-name"·/> | 201 | <col·class="field-name"·/> |
202 | <col·class="field-body"·/> | 202 | <col·class="field-body"·/> |
203 | <tbody·valign="top"> | 203 | <tbody·valign="top"> |
204 | <tr·class="field-odd·field"><th·class="field-name">Parameters:</th><td·class="field-body"><strong>message</strong>·–·error·message</td> | 204 | <tr·class="field-odd·field"><th·class="field-name">Parameters:</th><td·class="field-body"><strong>message</strong>·–·error·message</td> |
205 | </tr> | 205 | </tr> |
206 | </tbody> | 206 | </tbody> |
Offset 240, 15 lines modified | Offset 240, 15 lines modified |
240 | raise·a·<a·class="reference·internal"·href="#flask_wtf.csrf.CSRFError"·title="flask_wtf.csrf.CSRFError"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">CSRFError</span></code></a>.</p> | 240 | raise·a·<a·class="reference·internal"·href="#flask_wtf.csrf.CSRFError"·title="flask_wtf.csrf.CSRFError"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">CSRFError</span></code></a>.</p> |
241 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="nd">@csrf</span><span·class="o">.</span><span·class="n">error_handler</span> | 241 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="nd">@csrf</span><span·class="o">.</span><span·class="n">error_handler</span> |
242 | <span·class="k">def</span>·<span·class="nf">csrf_error</span><span·class="p">(</span><span·class="n">reason</span><span·class="p">):</span> | 242 | <span·class="k">def</span>·<span·class="nf">csrf_error</span><span·class="p">(</span><span·class="n">reason</span><span·class="p">):</span> |
243 | ····<span·class="k">return</span>·<span·class="n">render_template</span><span·class="p">(</span><span·class="s1">'error.html'</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="o">=</span><span·class="n">reason</span><span·class="p">)</span> | 243 | ····<span·class="k">return</span>·<span·class="n">render_template</span><span·class="p">(</span><span·class="s1">'error.html'</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="o">=</span><span·class="n">reason</span><span·class="p">)</span> |
244 | </pre></div> | 244 | </pre></div> |
245 | </div> | 245 | </div> |
246 | <p>Due·to·historical·reasons,·the·function·may·either·return·a·response | 246 | <p>Due·to·historical·reasons,·the·function·may·either·return·a·response |
247 | or·raise·an·exception·with·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">flask.abort()</span></code>.</p> | 247 | or·raise·an·exception·with·<a·class="reference·external"·href="https://flask.palletsprojects.com/en/1.1.x/api/#flask.abort"·title="(in·Flask·v1.1.x)"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">flask.abort()</span></code></a>.</p> |
248 | </dd></dl> | 248 | </dd></dl> |
| |
249 | <dl·class="method"> | 249 | <dl·class="method"> |
250 | <dt·id="flask_wtf.csrf.CSRFProtect.exempt"> | 250 | <dt·id="flask_wtf.csrf.CSRFProtect.exempt"> |
251 | <code·class="descname">exempt</code><span·class="sig-paren">(</span><em>view</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.csrf.CSRFProtect.exempt"·title="Permalink·to·this·definition">¶</a></dt> | 251 | <code·class="descname">exempt</code><span·class="sig-paren">(</span><em>view</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.csrf.CSRFProtect.exempt"·title="Permalink·to·this·definition">¶</a></dt> |
252 | <dd><p>Mark·a·view·or·blueprint·to·be·excluded·from·CSRF·protection.</p> | 252 | <dd><p>Mark·a·view·or·blueprint·to·be·excluded·from·CSRF·protection.</p> |
253 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="nd">@app</span><span·class="o">.</span><span·class="n">route</span><span·class="p">(</span><span·class="s1">'/some-view'</span><span·class="p">,</span>·<span·class="n">methods</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'POST'</span><span·class="p">])</span> | 253 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="nd">@app</span><span·class="o">.</span><span·class="n">route</span><span·class="p">(</span><span·class="s1">'/some-view'</span><span·class="p">,</span>·<span·class="n">methods</span><span·class="o">=</span><span·class="p">[</span><span·class="s1">'POST'</span><span·class="p">])</span> |
Offset 275, 15 lines modified | Offset 275, 15 lines modified |
| |
275 | <dl·class="class"> | 275 | <dl·class="class"> |
276 | <dt·id="flask_wtf.csrf.CSRFError"> | 276 | <dt·id="flask_wtf.csrf.CSRFError"> |
277 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.csrf.</code><code·class="descname">CSRFError</code><span·class="sig-paren">(</span><em>description=None</em>,·<em>response=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.csrf.CSRFError"·title="Permalink·to·this·definition">¶</a></dt> | 277 | <em·class="property">class·</em><code·class="descclassname">flask_wtf.csrf.</code><code·class="descname">CSRFError</code><span·class="sig-paren">(</span><em>description=None</em>,·<em>response=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.csrf.CSRFError"·title="Permalink·to·this·definition">¶</a></dt> |
278 | <dd><p>Raise·if·the·client·sends·invalid·CSRF·data·with·the·request.</p> | 278 | <dd><p>Raise·if·the·client·sends·invalid·CSRF·data·with·the·request.</p> |
279 | <p>Generates·a·400·Bad·Request·response·with·the·failure·reason·by·default. | 279 | <p>Generates·a·400·Bad·Request·response·with·the·failure·reason·by·default. |
280 | Customize·the·response·by·registering·a·handler·with | 280 | Customize·the·response·by·registering·a·handler·with |
281 | <code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">flask.Flask.errorhandler()</span></code>.</p> | 281 | <a·class="reference·external"·href="https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.errorhandler"·title="(in·Flask·v1.1.x)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">flask.Flask.errorhandler()</span></code></a>.</p> |
282 | </dd></dl> | 282 | </dd></dl> |
| |
283 | <dl·class="function"> | 283 | <dl·class="function"> |
284 | <dt·id="flask_wtf.csrf.generate_csrf"> | 284 | <dt·id="flask_wtf.csrf.generate_csrf"> |
285 | <code·class="descclassname">flask_wtf.csrf.</code><code·class="descname">generate_csrf</code><span·class="sig-paren">(</span><em>secret_key=None</em>,·<em>token_key=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.csrf.generate_csrf"·title="Permalink·to·this·definition">¶</a></dt> | 285 | <code·class="descclassname">flask_wtf.csrf.</code><code·class="descname">generate_csrf</code><span·class="sig-paren">(</span><em>secret_key=None</em>,·<em>token_key=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#flask_wtf.csrf.generate_csrf"·title="Permalink·to·this·definition">¶</a></dt> |
286 | <dd><p>Generate·a·CSRF·token.·The·token·is·cached·for·a·request,·so·multiple | 286 | <dd><p>Generate·a·CSRF·token.·The·token·is·cached·for·a·request,·so·multiple |
287 | calls·to·this·function·will·generate·the·same·token.</p> | 287 | calls·to·this·function·will·generate·the·same·token.</p> |