From: Seth Woodworth Date: Wed, 23 Jan 2013 06:06:48 +0000 (-0500) Subject: document Note.get_absolute_url X-Git-Tag: release-20150131~551^2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4c8ad19df9ffeeebfd8fc848b89a876375ae1f67;p=oweals%2Fkarmaworld.git document Note.get_absolute_url --- diff --git a/karmaworld/apps/notes/models.py b/karmaworld/apps/notes/models.py index 7b1f0b3..1a6828e 100644 --- a/karmaworld/apps/notes/models.py +++ b/karmaworld/apps/notes/models.py @@ -71,14 +71,13 @@ class Note(models.Model): otherwise use note.id """ if self.slug == None: + # return a url ending in slug return u"/{0}/{1}/{2}".format(self.course.school.slug, self.course.slug, self.slug) else: + # return a url ending in id return u"/{0}/{1}/{2}".format(self.course.school.slug, self.course.slug, self.id) -# FIXME: replace the following GOOGLE_USER in a settings.py -GOOGLE_USER = 'seth.woodworth@gmail.com' - class DriveAuth(models.Model): """ stored google drive authentication and refresh token used for interacting with google drive """