title: Current directory (os.getcwd) from within Django determined how?
body: <p>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).  </p>
  
  <p>On my dev machine, when I get current working directory via the cmds</p>
  
  <pre><code>import os
  dirspot = os.getcwd()
  print dirspot
  </code></pre>
  
  <p>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.</p>
  
  <p>So with my project (and manage.py) located at: </p>
  
  <pre><code>/home/ross/webapps/djangoarea/myproj
  </code></pre>
  
  <p>Running  </p>
  
  <pre><code>python manage.py shell
  </code></pre>
  
  <p>then the above os.getcwd() I get </p>
  
  <pre><code>/home/ross/webapps/djangoarea/myproj
  </code></pre>
  
  <p>But if I put the same command into a views.py and run my project, I get </p>
  
  <pre><code>/home/ross/
  </code></pre>
  
  <p>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? </p>
  
  <p>Thanks in advance,
  Ross.</p>