I created a django site on my laptop and after debugging it locally scp'ed it onto the webfaction server. I just did what the tutorial said and removed the myproject folder and switched a few variables to my page. It now cannot find the module that is inside my site and I have no idea why, I still have it included under the settings applications and it worked fine on my computer. Does django on webfaction do something different with storing modules? asked 12 May '11, 15:17 Chelsea Bingiel |
Django is just a Python module, and all other modules it needs (including pieces of your Django application) need to be on the Python Path for that to work. The easiest way to solve this problem is to add the path to your Django project into the python path (sys.path) within your WSGI file, as shown here: http://docs.webfaction.com/software/python.html#adding-to-sys-path-from-myproject-wsgi For example, if your django webapp is named "djangoapp" and your django project is named "my_django_proj", then you would:
The documentation page also gives the example of adding another directory to the pythonpath as well (to demonstrate the list functionality) but in your case this single line should be sufficient. Hope that helps! answered 12 May '11, 19:36 ryans ♦♦ |