这是我得到的错误:
ImproperlyConfigured: Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
Run Code Online (Sandbox Code Playgroud)
这是我的加载器模板代码:
if DEBUG:
TEMPLATE_LOADERS = [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
]
else:
TEMPLATE_LOADERS = [
('django.template.loaders.cached.Loader',(
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
'forum.modules.template_loader.module_templates_loader',
'forum.skins.load_template_source',
)),
]
Run Code Online (Sandbox Code Playgroud)
当我从互联网上下载项目时,所有这些代码都在那里.我正在尝试使用这些说明设置OSQA.我正在运行MS SQL Server并安装了Python 2.6.有关如何修复此错误的任何帮助(当我尝试运行runserver并找到设置我的东西的http链接时找到.错误会在命令行中弹出).我是Django和Python的新手,所以我真的不知道如何诊断正在发生的事情.manage.py
我有一个全局变量averagel,我试图在一个方法中操作.编译器没有设置值的问题,averagel = averagel / (xrestriction * yrestriction);但由于某种原因,当我尝试使用它来设置另一个变量时,它不喜欢它:
inside = (inside + averagel * (xrestriction * yrestriction)) - 2 * (averagel)(suml);
只有在我尝试使用averagel的值来设置另一个int的行上它才会返回错误'sqlDataReader.ReaderDemo.averagel'是一个'字段'但是像'type'一样使用.我也尝试在方法中将int设置为averagel的值,然后尝试使用该值来设置我的内部变量,但是返回时返回错误"找不到类型或命名空间名称'test'(你是否遗漏了)使用指令或汇编引用?)"和之前我所做的所有就是声明int test = averagel;
有什么想法可以在这里发生什么?
我希望这行代码能够工作 -
int start = s.IndexOf(""_type": "Person""name": "");
Run Code Online (Sandbox Code Playgroud)
但很明显双引号搞乱了搜索...有关如何使这个工作的任何想法?