[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /usr/bin/django-admin in python-django



On 20 July 2014 11:12, Brian May <brian@microcomaustralia.com.au> wrote:
See bugs #755341 and #755321.

Looks like code is trying to run django-admin as a python script, allows it to specify which version of python to use.

Only thing is, it isn't Python. It is now shell. This allows automatic choosing of which Python version to use.

Unfortunately, it might be more important being able to manually specify which Python version to use.

Or, another words, ideally we want all these to work:

python2 /usr/bin/django-admin - python2
python3 /usr/bin/django-admin - python3
/usr/bin/django-admin - autodetect.

Wonder if it is possible to have some magically hash bang line in /use/bin/django-admin to autodetect the python version to use? e.g.

=== cut ===
#!/usr/bin/python-auto-detect
from django.core import management

if __name__ == "__main__":
    management.execute_from_command_line()
=== cut ===


--
Brian May <brian@microcomaustralia.com.au>

Reply to: