Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ParsePy
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
OpenEdx
ParsePy
Commits
6fc03b73
Commit
6fc03b73
authored
Mar 25, 2015
by
Dan Krause
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #101 from dankrause/master
Add the ability to drop whole classes
parents
6c57fa86
746b34e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
parse_rest/connection.py
+8
-0
No files found.
parse_rest/connection.py
View file @
6fc03b73
...
...
@@ -57,9 +57,12 @@ def master_key_required(func):
raise
core
.
ParseError
(
message
)
func
(
obj
,
*
args
,
**
kw
)
return
ret
# Using this as "default=" argument solve the problem with Datetime object not being JSON serializable
def
date_handler
(
obj
):
return
obj
.
isoformat
()
if
hasattr
(
obj
,
'isoformat'
)
else
obj
class
ParseBase
(
object
):
ENDPOINT_ROOT
=
API_ROOT
...
...
@@ -141,6 +144,11 @@ class ParseBase(object):
def
DELETE
(
cls
,
uri
,
**
kw
):
return
cls
.
execute
(
uri
,
'DELETE'
,
**
kw
)
@classmethod
def
drop
(
cls
):
return
cls
.
POST
(
"
%
s/schemas/
%
s"
%
(
API_ROOT
,
cls
.
__name__
),
_method
=
"DELETE"
,
_ClientVersion
=
"browser"
)
class
ParseBatcher
(
ParseBase
):
"""Batch together create, update or delete operations"""
...
...
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