1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from piston.resource import Resource
8 class CsrfExemptResource(Resource):
9 """A Custom Resource that is csrf exempt"""
10 def __init__(self, handler, authentication=None):
11 super(CsrfExemptResource, self).__init__(handler, authentication)
12 self.csrf_exempt = getattr(self.handler, 'csrf_exempt', True)