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
746b817a
Commit
746b817a
authored
Jul 22, 2011
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace tweaks
parent
524954b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
djangorestframework/views.py
+12
-4
No files found.
djangorestframework/views.py
View file @
746b817a
...
@@ -160,17 +160,25 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
...
@@ -160,17 +160,25 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
class
ModelView
(
View
):
class
ModelView
(
View
):
"""A RESTful view that maps to a model in the database."""
"""
A RESTful view that maps to a model in the database.
"""
resource
=
resources
.
ModelResource
resource
=
resources
.
ModelResource
class
InstanceModelView
(
InstanceMixin
,
ReadModelMixin
,
UpdateModelMixin
,
DeleteModelMixin
,
ModelView
):
class
InstanceModelView
(
InstanceMixin
,
ReadModelMixin
,
UpdateModelMixin
,
DeleteModelMixin
,
ModelView
):
"""A view which provides default operations for read/update/delete against a model instance."""
"""
A view which provides default operations for read/update/delete against a model instance.
"""
_suffix
=
'Instance'
_suffix
=
'Instance'
class
ListModelView
(
ListModelMixin
,
ModelView
):
class
ListModelView
(
ListModelMixin
,
ModelView
):
"""A view which provides default operations for list, against a model in the database."""
"""
A view which provides default operations for list, against a model in the database.
"""
_suffix
=
'List'
_suffix
=
'List'
class
ListOrCreateModelView
(
ListModelMixin
,
CreateModelMixin
,
ModelView
):
class
ListOrCreateModelView
(
ListModelMixin
,
CreateModelMixin
,
ModelView
):
"""A view which provides default operations for list and create, against a model in the database."""
"""
A view which provides default operations for list and create, against a model in the database.
"""
_suffix
=
'List'
_suffix
=
'List'
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