Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
1e9ea377
Commit
1e9ea377
authored
Sep 18, 2014
by
Tom Christie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1887 from pipermerriam/piper/decorate_as_view_response_from_viewsets
Fix missing CSRF exemption on viewsets
parents
ddbd3cb6
7f758d1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
rest_framework/viewsets.py
+2
-1
No files found.
rest_framework/viewsets.py
View file @
1e9ea377
...
@@ -20,6 +20,7 @@ from __future__ import unicode_literals
...
@@ -20,6 +20,7 @@ from __future__ import unicode_literals
from
functools
import
update_wrapper
from
functools
import
update_wrapper
from
django.utils.decorators
import
classonlymethod
from
django.utils.decorators
import
classonlymethod
from
django.views.decorators.csrf
import
csrf_exempt
from
rest_framework
import
views
,
generics
,
mixins
from
rest_framework
import
views
,
generics
,
mixins
...
@@ -89,7 +90,7 @@ class ViewSetMixin(object):
...
@@ -89,7 +90,7 @@ class ViewSetMixin(object):
# resolved URL.
# resolved URL.
view
.
cls
=
cls
view
.
cls
=
cls
view
.
suffix
=
initkwargs
.
get
(
'suffix'
,
None
)
view
.
suffix
=
initkwargs
.
get
(
'suffix'
,
None
)
return
view
return
csrf_exempt
(
view
)
def
initialize_request
(
self
,
request
,
*
args
,
**
kargs
):
def
initialize_request
(
self
,
request
,
*
args
,
**
kargs
):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment