I'm a little bit uncertain about this. We're struggling to make web2py somewhat faster but then we're incline to drop in "faulty checks for every request" just to support run-time configs.... Can we think about something like global_settings_per_app that is set (and stored) at the first request only for the single app ?
On Tuesday, October 16, 2012 1:21:40 PM UTC+2, 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 >> > >> > -- >> > >> > >> > >> > --