在django项目中不正确地配置了模板 [英] ImproperlyConfigured about template in django project
问题描述
当我尝试访问我的django网站时,出现了错误配置错误错误,表示模块django.template.loaders.filesystem没有定义Loader可调用模板源加载器。
When I am trying to access my django site, it appeared the ImproperlyConfigured error say that "Module "django.template.loaders.filesystem" does not define a "Loader" callable template source loader".
我使用Bitnami Django Stack,这不是我第一次安装它,所以我认为旧的和新的之间有冲突。我试图清理以前的安装很多次,但它仍然是一样的。
I use Bitnami Django Stack and this is not the first time I installed it, so I think that there is the conflict between the old and new one somehow. I tried to clean the previous installation many times but it still be the same.
推荐答案
听起来你试图运行旧版Django版本上的网站。
Sounds like you're trying to run the site on an older Django version.
在settings.py文件中尝试'django.template.loaders.filesystem.load_template_source',而不是'django.template.loaders.filesystem .Loader。装载程序名称在更新版本中已更改。
In the settings.py file try 'django.template.loaders.filesystem.load_template_source' instead of 'django.template.loaders.filesystem.Loader'. The Loader name was changed in more recent versions.
这篇关于在django项目中不正确地配置了模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!