rvanlaar/djangorecipe — Issue #19: "django" script uses system Python instead of env Python
Author: rvanlaar
Created: 2011-12-27 21:40:20+00:00
State: open
Labels: Fix Released, Undecided

When the bin/django script is generated, it uses the Python that was used to run the buildout script. It should use whatever Python is available in the current environment.

For example, currently the bin/django script starts with (in my case):
#!/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6

Some of the other generated scripts (such as the wsgi script) start with:
#!/usr/bin/env python

This uses whatever Python is currently available.

My current buildout script creates not only my Django environment, but also the virtualenv to be used, but when I enter that virualenv (python2.6/bin/activate) Django continues to use the system-wide python instead of the local Python as it should.