~widelands-dev/widelands-website/solitaire_html_documentation

« back to all changes in this revision

Viewing changes to djangoratings/admin.py

  • Committer: franku
  • Date: 2016-05-18 19:31:46 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: somal@arcor.de-20160518193146-w5dmezymi3wlnhvl
added djangoratings and adjust it to django 1.8; updated update_problems.txt

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)