Created
August 21, 2014 01:24
-
-
Save xiaotangyuan/867a267dcccc0a60cda9 to your computer and use it in GitHub Desktop.
模板中的静态文件使用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 在模板html文件顶部加入下面这行 | |
{% load staticfiles %} | |
# 在使用静态文件的地方用: | |
<img src="{% static user.touxiang %}" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment