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
0e375644
Commit
0e375644
authored
May 20, 2013
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8 fixes
parent
a54ecb98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lms/djangoapps/notes/models.py
+6
-6
No files found.
lms/djangoapps/notes/models.py
View file @
0e375644
...
...
@@ -21,9 +21,9 @@ class Note(models.Model):
updated
=
models
.
DateTimeField
(
auto_now
=
True
,
db_index
=
True
)
def
clean
(
self
,
json_body
):
'''
"""
Cleans the note object or raises a ValidationError.
'''
"""
if
json_body
is
None
:
raise
ValidationError
(
'Note must have a body.'
)
...
...
@@ -53,16 +53,16 @@ class Note(models.Model):
self
.
tags
=
","
.
join
(
tags
)
def
get_absolute_url
(
self
):
'''
"""
Returns the absolute url for the note object.
'''
"""
kwargs
=
{
'course_id'
:
self
.
course_id
,
'note_id'
:
str
(
self
.
pk
)}
return
reverse
(
'notes_api_note'
,
kwargs
=
kwargs
)
def
as_dict
(
self
):
'''
"""
Returns the note object as a dictionary.
'''
"""
return
{
'id'
:
self
.
pk
,
'user_id'
:
self
.
user
.
pk
,
...
...
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