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

2014-07-21 Thread Matthias Urlichs
Hi, Karsten Hilbert: > Writing would make the first quote escape the second. > Not escape, but … > Or some such :-) > To make this more explicit: foo=''' ' echo This is Shell code exec python $0 ' ''' print("This is Python") So to Python, you have a (multiline, hence the triple-quote) st

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

2014-07-21 Thread Karsten Hilbert
On Mon, Jul 21, 2014 at 10:17:20AM +1000, Brian May wrote: > Not sure I understand it (that space in ' ''' seems to be important?), I would guess it creates a 3-quotes Python string embedded into a single-quote one: test = ' single-quotes string with: '''3-quotes-string''' embedded into it' Wr

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

2014-07-20 Thread Brian May
On 20 July 2014 19:00, Jakub Wilk wrote: > One possibility is to write a shell script that is also valid Python code. > PoC: > Not sure I understand it (that space in ' ''' seems to be important?), but it seems to work. Thanks. Another possibility is to create the django-admin symlink in mainta

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

2014-07-20 Thread Jakub Wilk
* Brian May , 2014-07-20, 11:47: 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. One possibility is to write a shell script that is also valid Python code. PoC: #!/bin/s

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

2014-07-19 Thread Brian May
On 20 July 2014 11:12, Brian May 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 Pytho

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

2014-07-19 Thread Brian May
On 7 July 2014 11:55, Brian May wrote: > The problem is that the django-admin wrapper chose the python3 version, > but karaage.tests.settings is only available in Python2, even though I have > python3-django installed. > See bugs #755341 and #755321. Looks like code is trying to run django-adm

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

2014-07-06 Thread Brian May
While I am happy with the majority of this package, not sure about this wrapper. It was designed to prevent conflicts between python-django and python3-django. As an example: (wheezy)root@aquitard:~# /usr/bin/django-admin dumpdata --settings=karaage.tests.settings Traceback (most recent call last