Forums

Making wsgi.py editable through dropbox

A simple ln -s /var/www/wsgi.py ~/Dropbox/wsgi.py doesn't work. Dropbox doesn't seem to see the file.

Making a symlink to /var/www works, but the contents are different from those seen when viewing it from the bash shell, it seems to contain the default index.html.

Is there another solution?

I think the best way to do this would be to make /var/www/wsgi.py a symlink to the one in your Dropbox:

rm /var/www/wsgi.py
ln -s /home/johtso/Dropbox/MySharedFolder/wsgi.py /var/www/wsgi.py

Having said that, we're having problems with Dropbox again today -- we're working on a fix right now.

The "rm /var/www/wsgi.py" command doesn't work for me, I don't seem to have permissions to delete it. I have permissions to edit it, but not delete it.

Hmmm, that's a good point. Here's an alternative: import your Dropbox wsgi file from the one in /var/www/:

import sys
wsgi_file_location = "/home/mysusername/Dropbox/MySharedFolder"
if wsgi_file_location not in sys.path:
    sys.path.append(wsgi_file_location)
from my_wsgi_file import *