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
02ee6e5b
Commit
02ee6e5b
authored
Feb 27, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix out of date docstrings. Closes #689.
parent
27aa2d6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
rest_framework/mixins.py
+4
-4
No files found.
rest_framework/mixins.py
View file @
02ee6e5b
...
...
@@ -37,7 +37,7 @@ def _get_validation_exclusions(obj, pk=None, slug_field=None):
class
CreateModelMixin
(
object
):
"""
Create a model instance.
Should be mixed in with any `
Base
View`.
Should be mixed in with any `
GenericAPI
View`.
"""
def
create
(
self
,
request
,
*
args
,
**
kwargs
):
serializer
=
self
.
get_serializer
(
data
=
request
.
DATA
,
files
=
request
.
FILES
)
...
...
@@ -94,7 +94,7 @@ class ListModelMixin(object):
class
RetrieveModelMixin
(
object
):
"""
Retrieve a model instance.
Should be mixed in with `SingleObject
Base
View`.
Should be mixed in with `SingleObject
API
View`.
"""
def
retrieve
(
self
,
request
,
*
args
,
**
kwargs
):
self
.
object
=
self
.
get_object
()
...
...
@@ -105,7 +105,7 @@ class RetrieveModelMixin(object):
class
UpdateModelMixin
(
object
):
"""
Update a model instance.
Should be mixed in with `SingleObject
Base
View`.
Should be mixed in with `SingleObject
API
View`.
"""
def
update
(
self
,
request
,
*
args
,
**
kwargs
):
partial
=
kwargs
.
pop
(
'partial'
,
False
)
...
...
@@ -158,7 +158,7 @@ class UpdateModelMixin(object):
class
DestroyModelMixin
(
object
):
"""
Destroy a model instance.
Should be mixed in with `SingleObject
Base
View`.
Should be mixed in with `SingleObject
API
View`.
"""
def
destroy
(
self
,
request
,
*
args
,
**
kwargs
):
obj
=
self
.
get_object
()
...
...
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