comparison gpp/downloads/models.py @ 23:a5f27f25fa52

Added a latest_downloads template tag. Made the comments view the details view for a download. Changed get_absolute_url to point to this new view.
author Brian Neal <bgneal@gmail.com>
date Sun, 19 Apr 2009 21:16:59 +0000
parents 7b6540b185d9
children 9c18250972d5
comparison
equal deleted inserted replaced
22:42f22c56ab05 23:a5f27f25fa52
67 def __unicode__(self): 67 def __unicode__(self):
68 return self.title 68 return self.title
69 69
70 @models.permalink 70 @models.permalink
71 def get_absolute_url(self): 71 def get_absolute_url(self):
72 return ('downloads-download', [str(self.id)]) 72 return ('downloads-details', [str(self.id)])
73 73
74 def save(self, force_insert=False, force_update=False): 74 def save(self, force_insert=False, force_update=False):
75 html = render_to_string('downloads/markdown.html', {'data': self.description}) 75 html = render_to_string('downloads/markdown.html', {'data': self.description})
76 self.html = html.strip() 76 self.html = html.strip()
77 super(Download, self).save(force_insert, force_update) 77 super(Download, self).save(force_insert, force_update)