django开发错误处理
2012-11-13 09:19
246 查看
在用open flash chart 的时候遇到这样一个问题,网站部署完成之后runserver,通过浏览器访问之后,页面报错如下
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
此时http的错误代码为500
对应处理办法为:
将settings.py中的以下部分
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source,
'django.template.loaders.app_directories.load_template_source,
# 'django.template.loaders.eggs.load_template_source',
)
修改为
'django.template.loaders.filesystem.Loader,
'django.template.loaders.app_directories.Loader,
之后重新runserver就好了
附:
http状态码
总体范围 已定义范围 类 别
100~199 100~101 信息
200~299 200~206 成功
300~399 300~305 重定向
400~499 400~415 客户端错误
500~599 500~505 服务器错误
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
此时http的错误代码为500
对应处理办法为:
将settings.py中的以下部分
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source,
'django.template.loaders.app_directories.load_template_source,
# 'django.template.loaders.eggs.load_template_source',
)
修改为
'django.template.loaders.filesystem.Loader,
'django.template.loaders.app_directories.Loader,
之后重新runserver就好了
附:
http状态码
总体范围 已定义范围 类 别
100~199 100~101 信息
200~299 200~206 成功
300~399 300~305 重定向
400~499 400~415 客户端错误
500~599 500~505 服务器错误
相关文章推荐
- iOS开发之—— XCODE真机调试设备连接一直忙碌如何处理!(真机调试各种错误提示解决)
- Python开发【Django】:时间处理
- iOS开发--"Library not found for -"错误处理
- php5与mysql5 web 开发技术详解-16 错误与异常处理
- AE开发中,对 COM 组件的调用返回了错误 HRESULT E_FAIL,在地理处理中,即GP工具处理时出错
- Android开发错误:Error:” ” is not translated in “en” (English) [MissingTranslation]处理方法?
- django forms 错误处理
- 详解EBS接口开发之供应商导入(补充)--错误信息处理
- 从C#到Objective-C,循序渐进学习苹果开发(4)--代码块(block)和错误异常处理的理解
- django1.5 Debug = False的错误处理方案
- 导入快速开发框架的时候处理的错误
- 项目开发时,出现异常,但控制台没有打印错误信息处理方法
- django一对多查询错误处理
- 详解EBS接口开发之供应商导入(补充)--错误信息处理
- 微信企业号开发:获取数据权限错误如何处理
- PHP的错误处理方式(开发和上线)
- Ruby on rails开发从头来(windows)(九)-给购物车添加错误处理
- [绍棠] React Native开发错误警告处理总结
- Unix/Linux C++应用开发-异常以及错误处理