Fastest way to temporarily take your django site down (maintenance).

Solution:

def application(environ, start_response):
status = '200 OK'
content = "Site down for maintenance"
response_headers = [('Content-Type', 'text/html'), ('Content-Length', str(len(content)))]
start_response(status, response_headers)
yield content.encode('utf8')

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store