So I am trying to get FeinCMS up and running and I have it working on the backend but I cannot get a page to load:
this is how my models.py is setup:
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')),
))
The error I get is
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)
Now I understand that if I put a base.html file in either of those directories it should work.
2 questions:
What does the base.html contents need to be? In order to be able to place the base.html in the app folder do I have to add that path to TEMPLATE_DIRS?
The FeinCMS installation has been rather tricky for me thus far
I added the absolute path to the TEMPLATE_DIRS and that allowed me to place the base.html where I wanted
in that file i placed the following code and I was able to view my page:
{% load feincms_tags %}
<div id="content">
{% block content %}
{% for content in feincms_page.content.main %}
{{ content.render }}
{% endfor %}
{% endblock %}
</div>
<div id="sidebar">
{% block sidebar %}
{% for content in feincms_page.content.sidebar %}
{{ content.render }}
{% endfor %}
{% endblock %}
</div>