As a short-term solution, I am using the following patch: In compileapp.py, is_gae is set depending on the result of imp.get_magic() so in build_environment() in the same module I store is_gae in environment['GAE']. Then in db.py I can say
if globals()['GAE']: before importing google stuff and using GQLDB() Have I a) re-invented the wheel, b) come up with a good solution, c) missed something important? On Feb 1, 9:06 am, billf <billferr...@blueyonder.co.uk> wrote: > I have installed the google appengine but do not want web2py to use > the google datastore just because the libs are there but that is what > the welcome app does. > > I have read some threads related to detecting GAE but they seemed > inconclusive. > > Is there a way that, in a model (or elsewhere for that matter) I can > detect if the app is running on GAE that doesn't depend on the > presence of google libs? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---