WebFaction
Community site: login faq

Hi, I've come back to setting up a Bottle application on a clients WebFaction account. A while ago I used the instructions found here:

setup python bottle

EDITED:

Found newer instructions for getting bottle working:

link text

However, I still cannot import any modules into my wsgi application. In my main application directory I have app.py and I have two folders called 'libs' and 'admin'. I have an init.py file in both. I have peewee.py (the orm) inside libs and something called views.py inside admin. However, Apache error log is still reporting there is no module named admin.views or libs.peewee.

How do I get my application to recognise these additional folders and modules. Importing a module in the same folder as app.wsgi works as long as it had no dependencies outside that directory. I haven't had chance to check if static folder routing inside the app is working as the app itself won't start yet. Many thanks for any help.

asked 19 Nov '13, 07:41

zilog8bit
(suspended)
accept rate: 0%

edited 19 Nov '13, 08:19


You should be able to get the application to see the additional modules if you set the WSGIPythonPath directive with the directories the modules are in.

permanent link

answered 19 Nov '13, 23:56

johns
5.4k412
accept rate: 23%

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:

×225
×108
×27
×9
×1

question asked: 19 Nov '13, 07:41

question was seen: 2,346 times

last updated: 19 Nov '13, 23:56

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 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