Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm currently using <a href="http://webpy.org/cookbook/templates_on_gae" rel="nofollow noreferrer">webpy</a> that has the same limitation, its templating system can't access parser module (blocked) and can't write to filesystem on Google App Engine, so you need to precompile the templates upfront. </p> <p>I have resolved this annoying issue with a Python script that, everytime a file of a given directory is changed, triggers the precompilation of that file.</p> <p>I'm on OSX and I'm using <a href="http://en.wikipedia.org/wiki/FSEvents" rel="nofollow noreferrer">FSEvents</a> but I believe you can find other solutions/libraries on any other platform (<a href="http://inotify.aiken.cz/?section=incron&amp;page=about&amp;lang=en" rel="nofollow noreferrer">incron</a> in Linux, <a href="https://stackoverflow.com/questions/760904/how-can-i-monitor-a-windows-directory-for-changes">FileSystemWatcher</a> on Windows):</p> <pre><code>from fsevents import Observer from fsevents import Stream from datetime import datetime import subprocess import os import time PROJECT_PATH = '/Users/.../Project/GoogleAppEngine/stackprinter/' TEMPLATE_COMPILE_PATH = os.path.join(PROJECT_PATH,'web','template.py') VIEWS_PATH = os.path.join(PROJECT_PATH,'app','views') def callback(event): if event.name.endswith('.html'): subprocess.Popen('python2.5 %s %s %s' % ( TEMPLATE_COMPILE_PATH ,'--compile', VIEWS_PATH) , shell=True) print '%s - %s compiled!' % (datetime.now(), event.name.split('/')[-1]) observer = Observer() observer.start() stream = Stream(callback, VIEWS_PATH, file_events=True) observer.schedule(stream) while not observer.isAlive(): time.sleep(0.1) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload