summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-30 18:56:36 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-30 18:56:36 +0000
commit8b36eb11d392b0ef2d448a7295e2de11086c47a8 (patch)
tree3cf7fc3a3eb76b8d8db680aedf88c5b707059518
parent716d00a31431add73bea0204cb5374947f71be87 (diff)
Gave comments.FreeComment a get_absolute_url() method
git-svn-id: http://code.djangoproject.com/svn/django/trunk@354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/comments/models/comments.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/comments/models/comments.py b/django/contrib/comments/models/comments.py
index b9ee199156..61cb6664fc 100644
--- a/django/contrib/comments/models/comments.py
+++ b/django/contrib/comments/models/comments.py
@@ -186,6 +186,9 @@ class FreeComment(meta.Model):
def __repr__(self):
return "%s: %s..." % (self.person_name, self.comment[:100])
+ def get_absolute_url(self):
+ return self.get_content_object().get_absolute_url() + "#c" + str(self.id)
+
def get_content_object(self):
"""
Returns the object that this comment is a comment on. Returns None if