擅长:python、mysql、java
<p>如烧瓶<a href="https://flask.palletsprojects.com/en/1.1.x/quickstart/#static-files" rel="nofollow noreferrer">docs</a>中所述:</p>
<blockquote>
<p>Just create a folder called static in your package or next to your module and it will be available at /static on the application.</p>
</blockquote>
<p>因此,如果在以下情况下使用模板:</p>
<pre><code>templates/dist/templates/index.html
static/ # set static folder there
</code></pre>
<p>或者,根据应用程序的排序方式:</p>
^{pr2}$
<p>看看他们如何在文档中对应用程序进行排序:</p>
<pre><code>/application.py
/templates
/hello.html
</code></pre>
<p>或者如果您使用模块文件夹:</p>
<pre><code>/application
/__init__.py
/templates
/hello.html
</code></pre>