A little tip Tim - your one-liner can also be achieved with the pkill
utility: pkill -u $USER -f manage.py runserver . The user matching with -u
$USER flag is cautious but probably unnecessary.
https://linux.die.net/man/1/pkill
On Tue, 8 Sep 2020 at 10:48, Tim Allen wrote:
> The advice here is
The advice here is solid, but to answer the initial query... i created a
one liner to kill any runservers from my current user, as they can get lost
in my sea of terminals. This may help:
alias kill-runserver="ps -eaf | grep 'manage.py runserver' |
grep "'$USER'" | grep -v grep | awk '{print "'
The canonical way to run a Django server is to link it up to a WSGI (uWSGI)
or gunicorn, then run Apache or Nginx on top of that. These latter two
things are typically handled through systemd. Some people use Docker or
Supervisor, but that might be a lot for you to learn right now. Gunicorn &
Nginx
Antonin,
Uri is right that runserver is only suitable for development. It's also
worth looking at during development - log output includes system check
failures, new migration detection, and stack traces when bugs occur. I
normally have it in a terminal window.
If you definitely want to run it in
I think the server run by "python manage.py runserver" is just a debugging
server, it is not suitable for production. For production you run a web
server such as Nginx or Apache which you configure to execute Django.
אורי
u...@speedy.net
On Mon, Sep 7, 2020 at 4:37 PM Antonín Drdácký wrote:
> H