I'm using Django 1.7 over Python 2.7 and noticed a strange behaviour on my production host (Webfaction) versus development machine (mac os x).
On my dev machine, when I get current working directory via the cmds
import os
dirspot = os.getcwd()
print dirspot
I get the location of the manage.py executable. When I do it on the host (webfaction) machine I get diff response depending if the Django site is running, vs using the Django shell.
So with my project (and manage.py) located at:
/home/ross/webapps/djangoarea/myproj
Running
python manage.py shell
then the above os.getcwd() I get
/home/ross/webapps/djangoarea/myproj
But if I put the same command into a views.py and run my project, I get
/home/ross/
I'm guessing maybe it's related to apache2 and wsgi running django rather than the manage.py invoking it. Anybody know how to get this to be consistent?
Thanks in advance, Ross.