Giter VIP home page Giter VIP logo

Comments (3)

GeyseR avatar GeyseR commented on August 20, 2024

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 [email protected]

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
.

from imagestore.

CapnKernel avatar CapnKernel commented on August 20, 2024

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)

from imagestore.

haindvn1980 avatar haindvn1980 commented on August 20, 2024

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

from imagestore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.