Gulp Task for Django runserver -


I am trying to create an action to start my Django backend.
I took a lot of time to solve them

  1. Search correctly to activate virtual environment
  2. stdout Get the manage.py runerver for output

    I've put together a solution to search for hours.
    I hope this will save a lot of time and frustration

    Below are fiction works, coffeescript Written in, the Django backend will begin:

      exec = requires ('child_process'). Exec gulp.task 'service: backend', - & gt; Proc = exec 'Source Bin / Active; PYTHONUNBUFFERED = 1 ./manage.py driver 'proc.stderr.on' data ', (data) - & gt; Process.stdout.write data proc.stdout.on 'data', (data) - & gt; Process.stdout.write data   

    You can run the job with Bulk Service: Backend
    Note:

    • You will not need to install any node package, built in child_process.
    • Use the parameter instead of span to be able to run multiple commands in one call
    • Not only stdout but stderr handle as well or you can log in to your logs Do not forget the request
    • Do not forget PYTHONUNBUFFERED or you will not see anything in your console (grmbl)

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -