X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/d0f0e1412cc42d366b234e798dfb68feed05d751..d555d988764995ea1f9f5ece46f453a66f09b334:/src/api/helpers.py?ds=inline diff --git a/src/api/helpers.py b/src/api/helpers.py new file mode 100644 index 0000000..a40373a --- /dev/null +++ b/src/api/helpers.py @@ -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