Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
GNU Terry Pratchett for webapp2
""" Add the GNU Terry Pratchett header to your webapp2 RequestHandler
A couple lines can be quickly added to your webapp2 handlers (commonly found in Google App
Engine instances) that adds the aforementioned header to ensure that his name will always
be spoken with the following Clacks codes:
G: send the message on
N: do not log the message
U: turn the message around at the end of the line and send it back again
'A man is not dead while his name is spoken.' -- Going Postal
RIP Sir Terry Pratchett 2015
Original Reddit thread:
class MainPage(webapp2.RequestHandler):
def __init__(self, *args, **kwargs):
super(MainPage, self).__init__(*args, **kwargs)
self.response.headers['X-Clacks-Overhead'] = 'GNU Terry Pratchett'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment