|
Maybe there's a better way to do this, but... I'd like to be able to have a "releases" directory in which I upload different version of my Django app (e.g., "v1.0", "v1.1", "v2.0", etc.) and a symbolic link called "current" that points to whichever version I want/need to run. Then $HOME/webapps/<appname> contains a symbolic link to $HOME/releases/current. What this buys me is the ability to:
As I say, there might be a cleaner, simpler, more straightforward way to do all of this...and I'm open to suggestions. (I stole this idea from the way Capistrano did things.) However...the thing that is creating a problem right now is that running manage.py (i.e., python2.7 manage.py) in a Django project in $HOME/release/v1.0/ directory complains that: Traceback (most recent call last): File "manage.py", line 2, in <module> from django.core.management import execute_manager ImportError: No module named django.core.management I'm sure this is just a Python path issue. But I can't figure out where/how the Python path is getting set. Is this all being handled in /home/<username>/webapps/<app_name>/lib/python2.7/site.py? Any hints on this? Thanks. |
|
It does sound like a path issue, see our documentation on python path for more info. Thanks for the pointer to the documentation. I've reviewed that document. It looks like it might be out of date though. For example: $HOME/webapps/app/lib/pythonX.Y is added to the Python search path when the current working directory is $HOME/webapps/app/ or below, where app is the name of an application as it appears in the control panel. Does not appear to be true (at least from what I can tell). Though, interestingly, I suspect that my problem has something to do with exactly what the above says it is doing. And, the reference to: /usr/lib/pythonX.Y/sitecustomize.py contains the complete implementation of the Python search path modifications. Doesn't appear to exist. For Python 2.7, the customization implementation is at I've just checked your account, and your You're right. I must've been in the wrong directory by mistake. Thanks. |
|
As for a suggestion of a clean way to do all of this, I think using git with a Django application is by far the best way to do this - and setting it up only takes about 5 minutes (feel free to open a support ticket if you get stuck). Thanks for the suggestion on the git setup. I will look into that approach. Maybe that's the better way of doing what I need to do. |