Is there any way to restart app when code file modified in pyramid framework?
pyramid.reload_templates
this varialbe work for template, but not for source code. I want to restart project asas code modified as nodemon npm package. Thanks
From the Pyramid documentation on Reloading Code (pruned for relevance):
During development, it's often useful to run
pserve
using its--reload
option. When--reload
is passed topserve
, changes to any Python module your project uses will cause the server to restart. This typically makes development easier, as changes to Python code made within a Pyramid application is not put into effect until the server restarts.
$VENV/bin/pserve development.ini --reload
Changes to template files (such as
.pt
or.mak
files) won't cause the server to restart. Changes to template files don't require a server restart as long as thepyramid.reload_templates
setting in thedevelopment.ini
file is true. Changes made to template files when this setting is true will take effect immediately without a server restart.