Let's suppose that I want to disable my web app for a certain period of 
time while I am updating the database and that I want to inform users that 
maintenance is in progress? 
1. In models I can create a global var MAINTENANCE_IN_PROGRESS = False 
which I could thange to True when I want to do some maintenance tasks. 
2. then in every function in every controller I could write something like:

def controller():
    if MAINTENANCE_IN_PROGRESS:
        Redirect_to_maintenance_message
    else:
       #do_controller_task

Is there some smarter way to do it without checking if maintenance is in 
progress in every function?


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to