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
bab2cc62
Commit
bab2cc62
authored
Oct 26, 2014
by
Mattias Granlund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
staticmethod -> classmethod
parent
e4241240
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
parse_rest/user.py
+11
-9
No files found.
parse_rest/user.py
View file @
bab2cc62
...
@@ -75,21 +75,23 @@ class User(ParseResource):
...
@@ -75,21 +75,23 @@ class User(ParseResource):
session_header
=
{
'X-Parse-Session-Token'
:
self
.
sessionToken
}
session_header
=
{
'X-Parse-Session-Token'
:
self
.
sessionToken
}
return
User
.
DELETE
(
self
.
_absolute_url
,
extra_headers
=
session_header
)
return
User
.
DELETE
(
self
.
_absolute_url
,
extra_headers
=
session_header
)
@
static
method
@
class
method
def
signup
(
username
,
password
,
**
kw
):
def
signup
(
cls
,
username
,
password
,
**
kw
):
response_data
=
User
.
POST
(
''
,
username
=
username
,
password
=
password
,
**
kw
)
response_data
=
User
.
POST
(
''
,
username
=
username
,
password
=
password
,
**
kw
)
response_data
.
update
({
'username'
:
username
})
response_data
.
update
({
'username'
:
username
})
return
User
(
**
response_data
)
return
cls
(
**
response_data
)
@
static
method
@
class
method
def
login
(
username
,
passwd
):
def
login
(
cls
,
username
,
passwd
):
login_url
=
'/'
.
join
([
API_ROOT
,
'login'
])
login_url
=
'/'
.
join
([
API_ROOT
,
'login'
])
return
User
(
**
User
.
GET
(
login_url
,
username
=
username
,
password
=
passwd
))
import
pdb
pdb
.
set_trace
()
return
cls
(
**
User
.
GET
(
login_url
,
username
=
username
,
password
=
passwd
))
@
static
method
@
class
method
def
login_auth
(
auth
):
def
login_auth
(
cls
,
auth
):
login_url
=
User
.
ENDPOINT_ROOT
login_url
=
User
.
ENDPOINT_ROOT
return
User
(
**
User
.
POST
(
login_url
,
authData
=
auth
))
return
cls
(
**
User
.
POST
(
login_url
,
authData
=
auth
))
@staticmethod
@staticmethod
def
request_password_reset
(
email
):
def
request_password_reset
(
email
):
...
...
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