I tried launching my Google App Engine app on localhost, and got a Django error I am stuck on.
"TemplateSyntaxError: Template 'base/_base.html' cannot be extended, because it doesn't exist"
I put the templates in a /templates, and then _base.html & index.html in /templates/base . Thanks! Emile @ proudn00b.com
The Error:
Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/init.py", line 511, in call handler.get(*groups) File "/Users/emilepetrone/code/thebuswheel/main.py", line 65, in get outstr = template.render(temp, { 'path': path }) ….
….. File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django/django/template/loader_tags.py", line 58, in get_parent raise TemplateSyntaxError, "Template %r cannot be extended, because it doesn't exist" % parent TemplateSyntaxError: Template 'base/_base.html' cannot be extended, because it doesn't exist
Referring to :
def get(self):
path = self.request.path
temp = os.path.join(
os.path.dirname(__file__),
'templates' + path)
if not os.path.isfile(temp):
temp = os.path.join(
os.path.dirname(__file__),
'templates/base/index.html')
outstr = template.render(temp, { 'path': path })
self.response.out.write(outstr)