change to autoreload feature so that it can regenerate static content upon modification

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

change to autoreload feature so that it can regenerate static content upon modification

manuel-58
Hello,

I am not sure others will find this useful, but I modified the
autoreload feature so that (besides restarting the application when
python code is modified) it also runs a user-specified external
command to regenerate static content when something in
engine.reload_files changes.

When a non-python file in engine.reload_files gets created, modified
or deleted then the command specified in the config item
'engine.autoreload_external_regenerate_cmd' gets executed through the
shell. Also, when an item in engine.reload_files turns out to be a
directory then it recursively watches all of its subdirs for changes.

These changes work well for me because when I edited HTML, CSS or JS
code I had to manually run the modified files through the templating
program before being able to see the changes. This solves that problem
while making use of cherrypy's own monitoring code. Perhaps others
using a similar setup will find this useful.

The patch is against the latest stable release (3.1.2)

http://pages.stern.nyu.edu/~marriaga/cherrypy_3.1.2_path_to_support_autoreload_regenerate_static.patch

All the best,

Manuel

--

You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/cherrypy-devel?hl=en.


Loading...