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?
asked Jul 30 '12 at 21:00
It's also possible that you're running manage.py with with wrong Python version - for example, using "
answered Jul 30 '12 at 23:14
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).