WebFaction
Community site: login faq
0
1

The app runs find from "python2.7 manage.py 123456". But when run from a webapp it can't find modules, giving errors like "TemplateSyntaxError: Caught ImportError while rendering: No module named rp2"

I can work around it a bit, but then I get: Exception Type: ImportError Exception Value:
No module named rp2.models

Why is the path different between manage.py and wsgi?

asked 12 Jun '12, 02:05

brycenesbitt
921319
accept rate: 0%

edited 12 Jun '12, 02:07


The solution is to manually set up the path in the wsgi file... but why is this not done by webfaction?

sys.path = ['/home/xxx/webapps/yyyy'] + sys.path
application = WSGIHandler()
permanent link

answered 12 Jun '12, 02:33

brycenesbitt
921319
accept rate: 0%

You can set the path in the WSGI file or through the PYTHONPATH environment variable. More information is available in our docs.

(12 Jun '12, 02:52) todork
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×910
×63

question asked: 12 Jun '12, 02:05

question was seen: 2,431 times

last updated: 12 Jun '12, 02:53

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM