Browse files

Added functools.wraps, otherwise all the requests matched the last route

  • Loading branch information...
1 parent 5e20dd2 commit 8d87d8fa5b90c7d33d3fe6974d4a85972ad85f13 @martriay martriay committed Mar 17, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 flaskext/
@@ -5,8 +5,10 @@
from simplejson import dumps
from flask import Response
+from functools import wraps
def jsonify(f):
+ @wraps(f)
def inner(*args, **kwargs):
return Response(dumps(f(*args, **kwargs)), mimetype='application/json')
return inner

0 comments on commit 8d87d8f

Please sign in to comment.