diff 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
line wrap: on
line diff
--- a/gpp/weblinks/models.py	Mon Dec 28 16:52:42 2009 +0000
+++ b/gpp/weblinks/models.py	Sun Jan 03 04:15:14 2010 +0000
@@ -81,6 +81,12 @@
     def url(self):
         return self.link.url
 
+    def get_link_url(self):
+        return '<a href="%s">Link #%d</a>' % (self.link.get_absolute_url(),
+                self.link.id)
+    get_link_url.allow_tags = True
+    get_link_url.short_description = "View Link on Site"
+
     def __unicode__(self):
         return self.link.title