api stub
[edumed.git] / api / helpers.py
diff --git a/api/helpers.py b/api/helpers.py
new file mode 100644 (file)
index 0000000..a40373a
--- /dev/null
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+from piston.resource import Resource
+
+
+class CsrfExemptResource(Resource):
+    """A Custom Resource that is csrf exempt"""
+    def __init__(self, handler, authentication=None):
+        super(CsrfExemptResource, self).__init__(handler, authentication)
+        self.csrf_exempt = getattr(self.handler, 'csrf_exempt', True)
\ No newline at end of file