diff options
| author | Piper Merriam | 2014-09-18 10:30:13 -0600 |
|---|---|---|
| committer | Piper Merriam | 2014-09-18 10:30:13 -0600 |
| commit | 7f758d1cf694c9227a1f55df400ff81e4bce2956 (patch) | |
| tree | 3edcd0b04fd0d5b1f40ab718b714fd54de999f04 | |
| parent | 8c8d355e761a67fffd334dc15bc7bb74238300bc (diff) | |
| download | django-rest-framework-7f758d1cf694c9227a1f55df400ff81e4bce2956.tar.bz2 | |
Fix missing CSRF exemption on viewsets
| -rw-r--r-- | rest_framework/viewsets.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/viewsets.py b/rest_framework/viewsets.py index bb5b304e..84b4bd8d 100644 --- a/rest_framework/viewsets.py +++ b/rest_framework/viewsets.py @@ -20,6 +20,7 @@ from __future__ import unicode_literals from functools import update_wrapper from django.utils.decorators import classonlymethod +from django.views.decorators.csrf import csrf_exempt from rest_framework import views, generics, mixins @@ -89,7 +90,7 @@ class ViewSetMixin(object): # resolved URL. view.cls = cls view.suffix = initkwargs.get('suffix', None) - return view + return csrf_exempt(view) def initialize_request(self, request, *args, **kargs): """ |
