diff gpp/downloads/models.py @ 14:7b6540b185d9

Added get_absolute_url() for my comments. Had to add a get_absolute_url() function for downloads in the process.
author Brian Neal <bgneal@gmail.com>
date Sat, 18 Apr 2009 19:14:17 +0000
parents dbd703f7d63a
children a5f27f25fa52
line wrap: on
line diff
--- a/gpp/downloads/models.py	Thu Apr 16 02:00:17 2009 +0000
+++ b/gpp/downloads/models.py	Sat Apr 18 19:14:17 2009 +0000
@@ -67,6 +67,10 @@
     def __unicode__(self):
         return self.title
 
+    @models.permalink
+    def get_absolute_url(self):
+        return ('downloads-download', [str(self.id)])
+
     def save(self, force_insert=False, force_update=False):
         html = render_to_string('downloads/markdown.html', {'data': self.description})
         self.html = html.strip()