Hi,
in the app folder create ro.html and modify jam/server_clases.py
.
.
def apply_changes(self, data, safe, file_name=None):
result = None
changes, params = data
file_name = 'ro.html'
if os.path.exists(file_name):
self.abort(u'This is a demo version with limited functionality. \
You are not allowed to write changes to the database. \
The full-featured version is located in the demo folder of the Jam.py package.')
else:
if not params:
params = {}
delta = self.delta(changes)
if self.task.on_apply:
result = self.task.on_apply(self, delta, params)
if result is None and self.on_apply:
result = self.on_apply(self, delta, params)
if result is None:
result = self.apply_delta(delta, safe)
return result
.
.
Now the app is read only. Remove ro.html, and it is not read only.
No need to restart the app.
This is useful for example for restricting updates after 5pm :)
I hope the new Jam will have similar by default (for builder.html too).
D.