Closed ghost closed 10 years ago
Hi! By default 'imagestore/base.html' trying to extend 'base.html' in root templates folder. But you can override this behaviour by pointing IMAGESTORE_TEMPLATE in your settings file to default template in your project
2013/8/11 schamhaartoupee notifications@github.com
Hello,
maybe i don't get it, but i have an issue trying out imagestore.
I use it with django-cms and tried to make a simple gallery, all settings default.
I get this error when i try to open the gallery
Exception Type: TemplateDoesNotExist Exception Value: base.html
Error during template rendering
In template /home/jonni/Projekte/fotoladen/lib/python2.7/site-packages/imagestore/templates/imagestore/base.html, error at line 1 base.html 1 {% extends IMAGESTORE_TEMPLATE|default:"base.html" %} 2 {% load i18n %} 3 {% load url from future %} 4
5 {% block head %} 6 {% if IMAGESTORE_LOAD_CSS %} 7 8 {% endif %} 9 {% endblock %} 10
11 {% block breadcrumb %}
I don't get it: the template "base.html" is trying to extend from itself? What am i thinking wrong?
— Reply to this email directly or view it on GitHubhttps://github.com/hovel/imagestore/issues/19 .
I had the same error message, even though I was settings IMAGESTORE_TEMPLATE
in settings.py
. It seemed that to the renderer, IMAGESTORE_TEMPLATE
wasn't set.
I finally traced it down to the context processor not being invoked, so the var was not there.
In my project, I'm using i18n, so I need to set TEMPLATE_CONTEXT_PROCESSORS
myself:
import django.conf.global_settings as DEFAULT_SETTINGS
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
'django.core.context_processors.i18n',
)
I needed to add imagestore's context processor:
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
'django.core.context_processors.i18n',
'imagestore.context_processors.imagestore_processor',
)
I think the need to plug in imagestore's context processor is something that would be good to add to the documentation.
(This is with Django 1.4, which I have to run for annoying non-technical reasons)
i think, you need call base.html file in all file : {% extends '../base.html' %}
Hello,
maybe i don't get it, but i have an issue trying out imagestore.
I use it with django-cms and tried to make a simple gallery, all settings default.
I get this error when i try to open the gallery
Exception Type: TemplateDoesNotExist Exception Value: base.html
Error during template rendering
In template /home/jonni/Projekte/fotoladen/lib/python2.7/site-packages/imagestore/templates/imagestore/base.html, error at line 1 base.html 1 {% extends IMAGESTORE_TEMPLATE|default:"base.html" %} 2 {% load i18n %} 3 {% load url from future %} 4
5 {% block head %} 6 {% if IMAGESTORE_LOAD_CSS %} 7 8 {% endif %} 9 {% endblock %} 10
11 {% block breadcrumb %}
I don't get it: the template "base.html" is trying to extend from itself? What am i thinking wrong?