Django maintenance mode is a middleware that allows you to temporary shutdown your site and display a maintenance page for users of your site, while still being able to fully use the site yourself. For more information please look at: http://pypi.python.org/pypi/django-maintenancemode/
Example
This is an overly simplified example of course, but hopefully it gets the message across. Imagine having a Django project with only one app in it, that serves one template. The template just says: 'Welcome to our website'
Of course the text is incorrect, this is a shiny new Django site! It should read: 'Welcome to our new website'. Now you want to change this, and test that the change actually works in production mode.
To do that you log in as a staff user first.
Then you activate the MaintenanceModeMiddleware as described in the Installation Instructions. And you set MAINTENANCE_MODE = True. Now when you as a staff user view the index page, you will see the 'Welcome to our website' text. But users that are not logged in (or are logged in but not a staff member). Will see this:
This is defined by a 503.html template which you put into your templates/ directory. The way MaintenanceModeMiddleware works is by defining a handler503, just like there is a handler404 and a handler500.
You can now do any update or maintenance work, being sure that users will not run into any strange errors because of this. In this case it is pretty simple of course: we just update the template and check that this change was successful.
And indeed it worked out! The update was successful, we can now allow all the users to see the changed site by setting MAINTENANCE_MODE = False in our settings file.
Contact
django-maintenancemode was written by Remco Wendt <remco@maykinmedia.nl>. Feel free to contact me with questions, suggestions etc.