From 8b36eb11d392b0ef2d448a7295e2de11086c47a8 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 30 Jul 2005 18:56:36 +0000 Subject: [PATCH] Gave comments.FreeComment a get_absolute_url() method git-svn-id: http://code.djangoproject.com/svn/django/trunk@354 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/comments/models/comments.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/contrib/comments/models/comments.py b/django/contrib/comments/models/comments.py index b9ee1991564..61cb6664fc1 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