Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
797 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 Vigges Developer Community for programmer and developer-Open, Learning and Share
...