Permalink
Browse files

Merge pull request #31 from nigelbabu/version-foo-admin

Admin interface for VersionCount
  • Loading branch information...
2 parents d619846 + 094d005 commit ba0d713632553f2983c78a6fba5064c00a2103b5 @davedash davedash committed Oct 24, 2011
Showing with 10 additions and 1 deletion.
  1. +10 −1 apps/feedback/admin.py
@@ -1,6 +1,6 @@
from django.contrib import admin
-from .models import Opinion, Term
+from .models import Opinion, Term, VersionCount
class OpinionAdmin(admin.ModelAdmin):
@@ -40,3 +40,12 @@ class TermAdmin(admin.ModelAdmin):
list_filter = ('hidden',)
search_fields = ['term']
admin.site.register(Term, TermAdmin)
+
+
+class VersionCountAdmin(admin.ModelAdmin):
+ list_display = ('product', 'version', 'num_opinions', 'active')
+ ordering = ('-version', 'product')
+ readonly_fields = ('product', 'version', 'num_opinions', 'version_int')
+ search_fields = ['version']
+
+admin.site.register(VersionCount, VersionCountAdmin)

0 comments on commit ba0d713

Please sign in to comment.