Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
09c607c6
Commit
09c607c6
authored
Feb 23, 2015
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get profile object from user, clarify null or "".
parent
8d030974
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
openedx/core/djangoapps/user_api/accounts/views.py
+9
-9
No files found.
openedx/core/djangoapps/user_api/accounts/views.py
View file @
09c607c6
...
@@ -27,19 +27,19 @@ class AccountView(APIView):
...
@@ -27,19 +27,19 @@ class AccountView(APIView):
**Response Values for GET**
**Response Values for GET**
* username:
The username associated with the account (not editable).
* username:
username associated with the account (not editable)
* name:
The full name of the user (not editable through this API).
* name:
full name of the user (not editable through this API)
* email:
The email for the user (not editable through this API).
* email:
email for the user (not editable through this API)
* date_joined:
The date this account was created (not editable).
* date_joined:
date this account was created (not editable)
* gender: null
, "m", "f", or "o":
* gender: null
or "" (not set), "m", "f", or "o"
* year_of_birth: null or integer year
:
* year_of_birth: null or integer year
* level_of_education: null or one of the following choices:
* level_of_education: null or
"" (not set), or
one of the following choices:
* "p" signifying "Doctorate"
* "p" signifying "Doctorate"
* "m" signifying "Master's or professional degree"
* "m" signifying "Master's or professional degree"
...
@@ -55,7 +55,7 @@ class AccountView(APIView):
...
@@ -55,7 +55,7 @@ class AccountView(APIView):
* city: null or name of city
* city: null or name of city
* country: null or a Country corresponding to one of the ISO 3166-1 countries
* country: null or
"" (not set), or
a Country corresponding to one of the ISO 3166-1 countries
* mailing_address: null or textual representation of mailing address
* mailing_address: null or textual representation of mailing address
...
@@ -119,7 +119,7 @@ class AccountView(APIView):
...
@@ -119,7 +119,7 @@ class AccountView(APIView):
existing_user
=
User
.
objects
.
get
(
username
=
username
)
existing_user
=
User
.
objects
.
get
(
username
=
username
)
except
ObjectDoesNotExist
:
except
ObjectDoesNotExist
:
return
Response
({},
status
=
status
.
HTTP_404_NOT_FOUND
)
return
Response
({},
status
=
status
.
HTTP_404_NOT_FOUND
)
existing_user_profile
=
UserProfile
.
objects
.
get
(
id
=
existing_user
.
id
)
existing_user_profile
=
UserProfile
.
objects
.
get
(
user
=
existing_user
)
return
existing_user
,
existing_user_profile
return
existing_user
,
existing_user_profile
...
...
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