Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
880 views
in Technique[技术] by (71.8m points)

shell - Django runserver permanent

How can I make the development server from django running permanent? So that it does't stop when I quit the shell.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

another easy way to do this is to run:

[user@host]$screen
[user@host]$python manage.py runserver 0.0.0.0:8000

Now press Ctrl+A and then press d to exit from this screen.

This creates the server in a screen and then detaches it. This way you can simply go back in and type:

[user@host]$screen -r

and you can take control of the server again and see whats going on.

You can also detach from the screen immediately:

screen -d -m python manage.py runserver 0.0.0.0:8000

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...