Created
March 21, 2013 22:57
-
-
Save philfreo/5217582 to your computer and use it in GitHub Desktop.
wrap MimeRender decorator so you have access to the original wrapped function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MimeRender(mimerender.FlaskMimeRender): | |
def __call__(self, *args, **kwargs): | |
ret = super(MimeRender, self).__call__(*args, **kwargs) | |
def wrap(target): | |
target._orig_func = target | |
return ret(target) | |
return wrap | |
mimerender = MimeRender() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment