~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to djangoratings/admin.py

  • Committer: franku
  • Date: 2016-12-13 18:28:51 UTC
  • mto: This revision was merged to the branch mainline in revision 443.
  • Revision ID: somal@arcor.de-20161213182851-bo5ebf8pdvw5beua
run the script

Show diffs side-by-side

added added

removed removed

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