I want to run “python manage.py runserver” from a bash script
First if I wanted to run from a terminal “python manage.py runserver &” but it doesn’t work. I found the fix for this in (https://code.djangoproject.com/changeset/16327). Manually in a terminal running “python manage.py runserver &” works fine.
I’ve added in a bash script “python manage.py runserver &” but it doesn’t start the server.
Error:
File "/usr/local/lib/python2.7/dist-packages/Django-1.3-py2.7.egg/django/utils/autoreload.py", line 137, in main
reloader(main_func, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.3-py2.7.egg/django/utils/autoreload.py", line 110, in python_reloader
reloader_thread()
File "/usr/local/lib/python2.7/dist-packages/Django-1.3-py2.7.egg/django/utils/autoreload.py", line 89, in reloader_thread
ensure_echo_on()
File "/usr/local/lib/python2.7/dist-packages/Django-1.3-py2.7.egg/django/utils/autoreload.py", line 77, in ensure_echo_on
attr_list = termios.tcgetattr(fd)
termios.error: (25, 'Inappropriate ioctl for device')
The problem is probably that hudson is not running as your user… you could run
to make it run that alias, but I think you’ll probably need to switch users
— or —
have hudson run the dev server from it’s own checkout of the source
Edit: Looking at your erro though, I think this may solve your problem:
instead of
try adding the
--noreloadflag to disable the auto reloader