所以我试图让 FeinCMS 启动并运行,我让它在后端工作,但我无法加载页面:
这就是我的 models.py 的设置方式:
Page.register_templates({
'title': _('Standard template'),
'path': 'base.html',
'regions': (
('main', _('Main content area')),
('sidebar', _('Sidebar'), 'inherited'),
),
})
Page.create_content_type(RichTextContent)
Page.create_content_type(MediaFileContent, TYPE_CHOICES=(
('default', _('default')),
('lightbox', _('lightbox')),
))
我得到的错误是
TemplateDoesNotExist at /test/
zipfel/base.html
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
Using loader django.template.loaders.app_directories.Loader:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/templates/zipfel/base.html (File does not exist)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/admin/templates/zipfel/base.html (File does not exist)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/admindocs/templates/zipfel/base.html (File does not exist)
/Library/Python/2.7/site-packages/feincms/templates/zipfel/base.html (File does not exist)
/Library/Python/2.7/site-packages/mptt/templates/zipfel/base.html (File does not exist)
现在我明白了,如果我将 base.html 文件放在其中任何一个目录中,它应该可以工作。
2个问题:
base.html 的内容需要是什么?为了能够将 base.html 放在 app 文件夹中,我必须将该路径添加到 TEMPLATE_DIRS 吗?
到目前为止,FeinCMS 的安装对我来说相当棘手