Hi, I had a heck of a time tracking down the cause of this error:
TemplateSyntaxError: Caught ImportError while rendering: No module named myApp
I found some relevant stuff here:
but it took me a while to figure out that I needed to fully qualify my app's name (as in project.myapp) throughout my project
The forum post above suggested that an overly permissive PYTHONPATH is the culprit. However, on my macosx system, I don't have a PYTHONPATH environment variable. I'd like to know how to recreate the conditions on my home system that better reflect the webfaction environment. Specifically how do I make my app break at home the same way it was breaking on webfaction?
asked Nov 21 '10 at 05:28
The PYTHONPATH is not always defined in an environment variable. It can also be edited directly in code by editing
Your local development environment probably already has your project in your PYTHONPATH. Rather than breaking your local environment, you'd be better off fixing your production environment.
In your httpd.conf (or your WSGI file) make sure that the path to your project is in your
Now you'll be able to just say
answered Nov 21 '10 at 05:37
David L ♦♦