filters: add a method which allows to store the request message in a string

This commit is contained in:
Jérôme Schneider 2015-01-21 11:40:57 +01:00
parent 03b0828d64
commit 1a868080ad
1 changed files with 7 additions and 0 deletions

View File

@ -121,3 +121,10 @@ class MandayeFilter(object):
values['account'] = current_account
return template_response("toolbar.html", values)
@staticmethod
def store_request_content_buffer(env, values, request):
""" on_request filter which allows to store the content of a post in request object
"""
if request.msg and not isinstance(request.msg, basestring):
request.msg = request.msg.read()