from flask import make_response, current_app from flask.views import MethodView from auth.decorators import m2m_auth_required class M2MAuthorizedView(MethodView): decorators = (m2m_auth_required,) def no_content(self): response = make_response("", 204) response.mimetype = current_app.config["JSONIFY_MIMETYPE"] return response