Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template not found "base.html" #19

Closed
ghost opened this issue Aug 11, 2013 · 3 comments
Closed

Template not found "base.html" #19

ghost opened this issue Aug 11, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 11, 2013

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?

@GeyseR
Copy link
Contributor

GeyseR commented Aug 11, 2013

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//issues/19
.

@GeyseR GeyseR closed this as completed Dec 21, 2013
@CapnKernel
Copy link

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)

@haindvn1980
Copy link

i think, you need call base.html file in all file : {% extends '../base.html' %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants