Alex
Alex

Reputation: 2420

Is there a way to automate restarting the python process after every change I make to Django models?

I am using Django with Passenger on Dreamhost.

Every time I make a change to models, settings or views I need to pkill python from a terminal session. Does anyone know of a way to automate this? Is this something that Passenger can do?

Upvotes: 1

Views: 220

Answers (1)

Rui Vieira
Rui Vieira

Reputation: 5328

My advice would be to test locally using Django's builtin server.

It does precisely auto-reload, so that any change to your code will be available.

I'm not familiar with Dreamhost, but if modwsgi is on embedded mode this is not possible. In Daemon mode, you could write some code to detect file changes and restart the processes.

Upvotes: 2

Related Questions