我想从bash脚本运行“python manage.py runserver”
首先,如果我想从终端“python manage.py runserver&”运行但它不起作用.我在(https://code.djangoproject.com/changeset/16327)找到了解决方法.在运行“python manage.py runserver&”的终端中手动运行工作良好.
我在bash脚本中添加了“python manage.py runserver&”但它不启动服务器.
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')
解决方法:
问题可能是哈德森没有像你的用户那样运行……你可以运行
source /home/your_user/.bashrc && django_serve
让它运行该别名,但我认为你可能需要切换用户
– 要么 –
让哈德森从它自己的源代码检查中运行开发服务器
编辑:虽然看着你的错误,我认为这可以解决你的问题:
代替
python manage.py runserver
尝试添加–noreload标志以禁用自动重新加载器
python manage.py runserver --noreload