lol.py

Sign up for a GitHub account Sign in Discover Gists public qpfiffer / lol.py Created 2014-04-18 Gist Detail Revisions 1 Download Gist Clone this gist Embed this gist Link to this gist lol.py Python File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 from django.contrib.messages.storage import default_storage class MessagesSuck ( object ): """ Shoots django messages in the face. """ def process_request ( self , request ): # Confuse django message, mezzanine and friends into # assuming we still work: class LetsPlayPretend ( list ): def add ( * args , ** kwargs ): pass def update ( * args , ** kwargs ): pass request . _messages = LetsPlayPretend () def process_response ( self , request , response ): return respo...

Linked on 2014-04-18 22:06:21 | Similar Links