Python中文
首页
教程
问答
标签
搜索
登录
注册
pythonanwhere“staticfiles”不是有效的标记库:找不到模板库staticfiles
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>在pythonanwhere中,我将virtualenv与django1.7和python2.7一起使用</p> <p><strong>设置.py</strong></p> <pre><code>STATIC_ROOT = '/home/movies/pantherlist/movies/static/' STATIC_URL = '/static/' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'pantherlist.movies', ) </code></pre> <p><strong>wsgi.py</strong></p> ^{pr2}$ <p>我弄错了</p> <p>异常类型:TemplateSyntaxError 异常值:<br/> “staticfiles”不是有效的标记库:找不到模板库staticfiles,已尝试django.templatetags.staticfiles,django.contrib.admin.templatetags.staticfiles在</p> <p><strong>异常位置:/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py加载时,第1054行</strong></p> <p>错误发生在 <strong>索引.html</strong></p> <pre><code>{% load staticfiles %} </code></pre> <p>请帮忙。提前谢谢。在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>在将virtualenv激活添加到wsgi文件之后,您似乎没有重新加载web应用程序,或者您没有使用您认为正在使用的wsgi文件。Django报告的错误位置(/usr/local/lib/python2.7/dist-packages/Django/template/defaulttags.py)在pythonanwhere上的默认系统Django中,而不是virtualenv中的Django。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
在python3中使用Scipy pearsonr函数
2 回答
在Python3中使用scipy对多个lorentzian进行数据拟合
6 回答
在Python3中使用Script=argv
9 回答
在python3中使用selenium webdriver进行未解析的回溯
2 回答
在python3中使用selenium和phantomjs的网页截图之前如何等待?
10 回答
在Python3中使用Selenium和Requests模块从网页获取文件
8 回答
在python3中使用SIGINT终止函数
10 回答
在Python3中使用SIGTERM时,允许进程完成而不是中断
4 回答
在python3中使用smtplib发送XML内容
9 回答
在python3中使用socket库(RFCOMM模式)重新连接蓝牙设备?
7 回答
在python3中使用sounddevice和numpy编写wav文件
1 回答
在python3中使用Sqlalchemy插入MySQL查找类型错误的原因
6 回答
在python3中使用sqlite、pandas和sqlalchemy很难让rollback工作
8 回答
在python3中使用SQLite的FTS3/4
4 回答
在Python3中使用struct.calcsize()和len()有区别吗?
5 回答
在python3中使用substring函数时发生TypeError
7 回答
在Python3中使用Tkinter entry小部件写入串行设备
3 回答
在python3中使用tkinter时,如何在每次按下函数时获得运行该函数的按钮?
10 回答
在python3中使用tkinter的子帧
8 回答
在Python3中使用tryexcept块时,如何避免使用未初始化的变量?
6 回答