El lunes, 8 de octubre de 2012 14:32:47 UTC-3, Massimo Di Pierro escribió:
>
> You have different ways:
>
> if request.function!='maintenance':
> try:
> db = DAL('sqlite://storage.sqlite')
> except:
> redirect(URL('default', 'maintenance'))
> else: db = None
>
> But then you need to check (if db) every time you use db in models.
>
> You can use conditional models:
>
> - Move all your models under a models/default/ subfolder so they only run
> when the default.py controller is executed.
> - Put the maintenance action in a different controller
>
> Make another app that only reports maintenance issues and redirect to an
> action in the other app.
>
Thanks Massimo
Jose
--