~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to djangoratings/admin.py

  • Committer: Holger Rapp
  • Date: 2016-08-08 10:06:42 UTC
  • mto: This revision was merged to the branch mainline in revision 419.
  • Revision ID: sirver@gmx.de-20160808100642-z62vwqitxoyl5fh4
Added the apt-get update script I run every 30 days.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from django.contrib import admin
 
2
from models import Vote, Score
 
3
 
 
4
class VoteAdmin(admin.ModelAdmin):
 
5
    list_display = ('content_object', 'user', 'ip_address', 'cookie', 'score', 'date_changed')
 
6
    list_filter = ('score', 'content_type', 'date_changed')
 
7
    search_fields = ('ip_address',)
 
8
    raw_id_fields = ('user',)
 
9
 
 
10
class ScoreAdmin(admin.ModelAdmin):
 
11
    list_display = ('content_object', 'score', 'votes')
 
12
    list_filter = ('content_type',)
 
13
 
 
14
admin.site.register(Vote, VoteAdmin)
 
15
admin.site.register(Score, ScoreAdmin)