pvl/web/response.py
changeset 438 d45fc43c6073
parent 437 5100b359906c
child 439 6a8ea0d363c1
--- a/pvl/web/response.py	Tue Feb 24 12:47:09 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-from werkzeug.wrappers import Response
-from werkzeug.exceptions import (
-        HTTPException, 
-        BadRequest,         # 400
-        NotFound,           # 404
-)
-from werkzeug.utils import redirect
-
-
-import json as _json
-
-def html (tag, **opts) :
-    """
-        Return text/html response for given pvl.web.html
-    """
-
-    return Response(unicode(tag), mimetype='text/html', **opts)
-
-def json (data, **opts) :
-    """
-        Return text/json response for given object.
-    """
-
-    return Response(_json.dumps(data), mimetype='text/json', **opts)
-
-def image (file, type='png') :
-    """
-        Return image/{type} response for given file-like object.
-    """
- 
-    # respond with file wrapper
-    return Response(file, mimetype='image/{type}'.format(type=type), direct_passthrough=True)        
-