comparison gpp/weblinks/admin.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 dbd703f7d63a
children fa7d82bfb100
comparison
equal deleted inserted replaced
164:f7a6b8fe4556 165:952e05cb3d80
13 search_fields = ('title', 'description', 'url', 'user__username') 13 search_fields = ('title', 'description', 'url', 'user__username')
14 raw_id_fields = ('user', ) 14 raw_id_fields = ('user', )
15 save_on_top = True 15 save_on_top = True
16 16
17 class FlaggedLinkAdmin(admin.ModelAdmin): 17 class FlaggedLinkAdmin(admin.ModelAdmin):
18 list_display = ('__unicode__', 'url', 'date_flagged') 18 list_display = ('__unicode__', 'url', 'get_link_url', 'user', 'date_flagged')
19 date_hierarchy = 'date_flagged' 19 date_hierarchy = 'date_flagged'
20 raw_id_fields = ('user', ) 20 raw_id_fields = ('user', )
21 21
22 admin.site.register(Category) 22 admin.site.register(Category)
23 admin.site.register(Link, LinkAdmin) 23 admin.site.register(Link, LinkAdmin)