Commit 0e375644 by e0d

pep8 fixes

parent a54ecb98
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment