2010-04-16

How I fixed TemplateNotFound error

Hi, it is NISHIO Hirokazu! Yesterday I deployed my brand-new application with kay-framework, but it doesn't work. It said TemplateNotFound occured. It worked on my local server.

It came from very simple mistake! I used Deploy button on my GoogleAppEngineLauncher. It run "appcfg.py update" directly. However, we should not use "appcfg.py update" directly. Use "manage.py appcfg update".

Jinja2 (used in Kay) pre-parse templates and compile them to python codes. You can do it to run "manage.py preparse_apps". And when you do "manage.py appcfg update", it also do preparsing. Unfortunately I did "appcfg.py update" so the lack of preparsing phase caused TemplateNotFound.