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
7f758d1c
Commit
7f758d1c
authored
Sep 18, 2014
by
Piper Merriam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing CSRF exemption on viewsets
parent
8c8d355e
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 @
7f758d1c
...
@@ -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