reload templates but not code

55 vistas
Ir al primer mensaje no leído

shahn

no leída,
21 mar 2012, 9:01:37 p.m.21/3/12
para snap_fr...@googlegroups.com
Hi!

With -fdevelopment you get a snap application that watches both the templates and the code for changes and reloads accordingly. Is there a way to get an application that would only reload the templates in case of changes and not the code?

Our use case is this: The person doing templates has a directory containing a snaplet subdirectory and all the needed templates. The snap application is started in this directory. If he changes the templates the application should reload the templates. But we don't need code recompilation. In fact, snap's attempts at code reloading cause trouble, i.e.:

can't find a package database at dist/package.conf.inplace


Thanks,
Sönke

MightyByte

no leída,
21 mar 2012, 9:05:09 p.m.21/3/12
para snap_fr...@googlegroups.com

shahn

no leída,
21 mar 2012, 9:17:56 p.m.21/3/12
para snap_fr...@googlegroups.com
I see. This does exactly, what we need:

while inotifywait snaplets/heist/resources/**/* ; do curl localhost:8000/admin/reload ; done

That's great, thanks.

MightyByte

no leída,
21 mar 2012, 9:23:17 p.m.21/3/12
para snap_fr...@googlegroups.com
Note that we restricted this to requests coming from localhost because
otherwise there's the potential for a DOS attack. If you want it
available from outside the site, you could create your own route for
it and control access with auth.

shahn

no leída,
21 mar 2012, 11:05:44 p.m.21/3/12
para snap_fr...@googlegroups.com
Am Donnerstag, 22. März 2012 02:23:17 UTC+1 schrieb mightybyte:
Note that we restricted this to requests coming from localhost because
otherwise there's the potential for a DOS attack.

I was wondering about that. And I hoped there was a restriction to localhost. Good to know there is, thanks.

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos