Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
048d7740
Commit
048d7740
authored
5 years ago
by
aarif
Browse files
Options
Downloads
Patches
Plain Diff
python 3 fixes
parent
5801f000
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/student/models.py
+5
-4
5 additions, 4 deletions
common/djangoapps/student/models.py
with
5 additions
and
4 deletions
common/djangoapps/student/models.py
+
5
−
4
View file @
048d7740
...
...
@@ -40,6 +40,7 @@ from django.utils.functional import cached_property
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.translation
import
ugettext_noop
from
django_countries.fields
import
CountryField
from
django.utils.encoding
import
python_2_unicode_compatible
from
edx_django_utils.cache
import
RequestCache
from
edx_rest_api_client.exceptions
import
SlumberBaseException
from
eventtracking
import
tracker
...
...
@@ -2813,6 +2814,7 @@ class RegistrationCookieConfiguration(ConfigurationModel):
)
@python_2_unicode_compatible
class
UserAttribute
(
TimeStampedModel
):
"""
Record additional metadata about a user, stored as key/value pairs of text.
...
...
@@ -2828,12 +2830,11 @@ class UserAttribute(TimeStampedModel):
name
=
models
.
CharField
(
max_length
=
255
,
help_text
=
_
(
"
Name of this user attribute.
"
),
db_index
=
True
)
value
=
models
.
CharField
(
max_length
=
255
,
help_text
=
_
(
"
Value of this user attribute.
"
))
def
__unicode__
(
self
):
"""
Unicode representation of this attribute.
"""
return
u
"
[{username}] {name}: {value}
"
.
format
(
def
__str__
(
self
):
return
"
[{username}] {name}: {value}
"
.
format
(
name
=
self
.
name
,
value
=
self
.
value
,
username
=
self
.
user
.
username
,
username
=
self
.
user
.
username
)
@classmethod
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment