diff gpp/forums/admin.py @ 113:d97ceb95ce02

Forums: ForumLastVisit logic in place. Need to add code for topics and posts next.
author Brian Neal <bgneal@gmail.com>
date Sun, 11 Oct 2009 19:10:54 +0000
parents e67c4dd98db5
children 500e5875a306
line wrap: on
line diff
--- a/gpp/forums/admin.py	Wed Sep 30 00:42:13 2009 +0000
+++ b/gpp/forums/admin.py	Sun Oct 11 19:10:54 2009 +0000
@@ -8,6 +8,7 @@
 from forums.models import Topic
 from forums.models import Post
 from forums.models import FlaggedPost
+from forums.models import TopicLastVisit
 
 
 class CategoryAdmin(admin.ModelAdmin):
@@ -48,8 +49,14 @@
     list_display = ('__unicode__', 'flag_date', 'get_post_url')
 
 
+class TopicLastVisitAdmin(admin.ModelAdmin):
+    raw_id_fields = ('user', 'topic')
+    list_display = ('user', 'topic', 'last_visit')
+
+
 admin.site.register(Category, CategoryAdmin)
 admin.site.register(Forum, ForumAdmin)
 admin.site.register(Topic, TopicAdmin)
 admin.site.register(Post, PostAdmin)
 admin.site.register(FlaggedPost, FlaggedPostAdmin)
+admin.site.register(TopicLastVisit, TopicLastVisitAdmin)