I added this current.T.is_writable = False or True
I do not think this adds any performance penalty because writes should not happen anyway. If they happen, there is already a big performance hit. On Tuesday, 16 October 2012 06:21:40 UTC-5, Massimo Di Pierro wrote: > > Fran is right. We need this configurable per app, not global.... > > On Tuesday, 16 October 2012 05:32:19 UTC-5, Fran wrote: >> >> On 15 October 2012 20:17, Vladyslav Kozlovskyy <vld...@gmail.com> wrote: >> > sure, it's a right decision :) >> >> Thanks for adding this, however I actually don't see this as ideal now. >> Here it is read only once - at web2py startup. >> I'm not sure how or where I would set this. >> >> Ideally I'd like to control this setting within my application, >> through something like current.request.xxx >> >> Are you ok if I modify this to work in that way? >> >> Best Wishes, >> Fran. >> >> >> > У пн, 2012-10-15 у 18:44 +0100, Fran Boon пише: >> > >> > On 15 October 2012 18:36, Vladyslav Kozlovskyy <vld...@gmail.com> >> wrote: >> >> We have [is_gae] variable in [gluon/languages.py] to avoid writting >> dicts >> >> in >> >> Google AppEngine. >> >> All we need is to make such replacement in [gluon/languages.py]: >> >> replace >> >> 38 is_gae = settings.global_settings.web2py_runtime_gae >> >> with >> >> 38 is_gae = settings.global_settings.web2py_runtime_gae or >> >> setings.global_settings.languages_readonly # or use better varname :) >> > >> > Right - this is the right place to do it, but I'd do: >> > 38 read_only = settings.global_settings.web2py_runtime_gae or >> > settings.global_settings.languages_readonly >> > >> > & then replace other is_gae refs with that... >> > >> > F >> > >> > -- >> > >> > >> > >> > --