diff gpp/forums/models.py @ 529:7388cdf61b25

For #241, add a URL to view the last post in a forum topic.
author Brian Neal <bgneal@gmail.com>
date Thu, 22 Dec 2011 02:10:27 +0000
parents 9d3bd7304050
children 9e42e6618168
line wrap: on
line diff
--- a/gpp/forums/models.py	Wed Dec 21 01:25:10 2011 +0000
+++ b/gpp/forums/models.py	Thu Dec 22 02:10:27 2011 +0000
@@ -198,6 +198,10 @@
     def get_absolute_url(self):
         return ('forums-topic_index', [self.pk])
 
+    @models.permalink
+    def get_latest_post_url(self):
+        return ('forums-topic_latest', [self.pk])
+
     def post_count_update(self):
         """
         Call this function to notify the topic instance that its post count