Forums

Struggling with deploying via Dropbox

Hi everyone. I promise I tried to solve my problem reading all over the place but I could not.

I'm trying to do the steps to a tutorial on web2py (http://killer-web-development.com/)

It has us make an app called "first" where we change just a small amount of text. It then has us deploy the app by packing it and then using the old "upload and install packed application". It seems this has been removed so I tried using the dropbox route instead.

For the life of me, I cannot figure out how to upload my application or how to change the path _wsgi.py to project_home = u'/home/[me]/Dropbox/dropbox@pythonanywhere.com/[myapplication]

How do I import a simply application onto pythonanywhere and get it to load? What's the best way to do this? How can one move files around in here (from my dropbox folder to my original web2py folder that was automatically setup)?

If you want to point your web app to the one you have in your Dropbox, you can just change the WSGI file here -- change line 12, where it currently will say something like

project_home = u'/home/kpennell/web2py/'

to say something like this:

project_home = u'/home/kpennell/Dropbox/dropbox@pythonanywhere.com/[myapplication]

...updating myapplication appropriately, then go back to the web app tab, select your web app from the list on the right, and hit the "Reload web app" button.

Thanks so much for the response. I get this error log: 2013-01-14 22:42:33,787 :ImportError: No module named gluon.main

I have a folder in there called web2py. Do I stop at web2py or do I have to point to the exact application in the application folder?

If you do an ls in your web2py folder, it should look something like this:

CHANGELOG __init__.py cgihandler.py gaehandler.py modpythonhandler.py routes.example.py setup_exe.py welcome.w2p
LICENSE anyserver.py deposit gluon options_std.py scgihandler.py setup_exe_2.6.py wsgihandler.py
Makefile app.example.yaml epydoc.conf isapiwsgihandler.py parameters_443.py scripts site-packages
README appengine_config.py epydoc.css logging.example.conf queue.example.yaml setup.py splashlogo.gif
VERSION applications fcgihandler.py logs router.example.py setup_app.py web2py.py

If it doesn't, there may be something wrong with your installation.

project_home = u'/home/user_name/Dropbox/dropbox@pythonanywhere.com/[myapplication]'

I was having this issue too; turns out the project_home indicated above is incorrect. It works if I change it to:

project_home = u'/home/user_name/Dropbox/[myapplication]'

Right, the project_home above was specifically for kpennell -- the folder he'd shared with us was called dropbox@pythonanywhere.com. If you've shared a different folder with us then you need to specify that folder there instead.