Mercurial > public > sg101
comparison gpp/weblinks/models.py @ 165:952e05cb3d80
Implement #49; use POST for updating link hit counts. Also refactored a bit and use javascript to report broken links.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 03 Jan 2010 04:15:14 +0000 |
parents | c0d0779b266f |
children | 5c889b587416 |
comparison
equal
deleted
inserted
replaced
164:f7a6b8fe4556 | 165:952e05cb3d80 |
---|---|
79 super(FlaggedLink, self).save(force_insert, force_update) | 79 super(FlaggedLink, self).save(force_insert, force_update) |
80 | 80 |
81 def url(self): | 81 def url(self): |
82 return self.link.url | 82 return self.link.url |
83 | 83 |
84 def get_link_url(self): | |
85 return '<a href="%s">Link #%d</a>' % (self.link.get_absolute_url(), | |
86 self.link.id) | |
87 get_link_url.allow_tags = True | |
88 get_link_url.short_description = "View Link on Site" | |
89 | |
84 def __unicode__(self): | 90 def __unicode__(self): |
85 return self.link.title | 91 return self.link.title |
86 | 92 |
87 class Meta: | 93 class Meta: |
88 ordering = ('-date_flagged', ) | 94 ordering = ('-date_flagged', ) |