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
0bc9d3ae
Commit
0bc9d3ae
authored
Jan 27, 2011
by
tom christie tom@tomchristie.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup on Resource
parent
e9168b50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
14 deletions
+1
-14
flywheel/resource.py
+1
-14
No files found.
flywheel/resource.py
View file @
0bc9d3ae
...
@@ -11,15 +11,8 @@ import re
...
@@ -11,15 +11,8 @@ import re
# TODO: Figure how out references and named urls need to work nicely
# TODO: Figure how out references and named urls need to work nicely
# TODO: POST on existing 404 URL, PUT on existing 404 URL
# TODO: POST on existing 404 URL, PUT on existing 404 URL
#
#
# NEXT: Validators to become generic, forms to move out of Resource into FormValidator
# NEXT: Permissions to become generic, UserAllowed, Throttling
# NEXT: Exceptions on func() -> 500, tracebacks emitted if settings.DEBUG
# NEXT: Exceptions on func() -> 500, tracebacks emitted if settings.DEBUG
# NEXT: Caching cleverness
# NEXT: Test non-existent fields on ModelResources
#
#
# FUTURE: Erroring on read-only fields
# Documentation, Release
__all__
=
[
'Resource'
]
__all__
=
[
'Resource'
]
...
@@ -69,13 +62,7 @@ class Resource(object):
...
@@ -69,13 +62,7 @@ class Resource(object):
"""Make the class callable so it can be used as a Django view."""
"""Make the class callable so it can be used as a Django view."""
self
=
object
.
__new__
(
cls
)
self
=
object
.
__new__
(
cls
)
self
.
__init__
(
request
)
self
.
__init__
(
request
)
# TODO: Remove this debugging code
return
self
.
_handle_request
(
request
,
*
args
,
**
kwargs
)
try
:
return
self
.
_handle_request
(
request
,
*
args
,
**
kwargs
)
except
:
import
traceback
traceback
.
print_exc
()
raise
def
__init__
(
self
,
request
):
def
__init__
(
self
,
request
):
...
...
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