Tag Archives: decorator

How to manage Google AppEngine maintenance periods

AppEngine logoHere is a small snippet of code that I use on applications deployed on Google AppEngine to inform users that the application is in maintenance mode.

It usually happen when the AppEngine team put the datastore in read-only mode for maintenance purpose but other capabilities can be tested as well.

This is a python decorator and you can use it to decorate views that require write access to the datastore. For example:

You will need to create a Django template named maintenance.html to display a warning to your users. Mine looks like this: