擅长:python、mysql、java
<p>根据<a href="https://docs.djangoproject.com/en/dev/howto/static-files/" rel="nofollow noreferrer">docs</a>正确的方式加载静态文件是</p>
<pre><code>{% load staticfiles %}
<img src="{% static 'my_app/myexample.jpg' %}" alt="My image"/>
</code></pre>
<p>这样就行了</p>