~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to djangoratings/admin.py

  • Committer: franku
  • Date: 2018-11-21 17:54:32 UTC
  • mfrom: (508.1.1 widelands)
  • Revision ID: somal@arcor.de-20181121175432-8rc3h0332xmgmma4
merged trunk, resolved conflicts

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
 
 
5
 
class VoteAdmin(admin.ModelAdmin):
6
 
    list_display = ('content_object', 'user', 'ip_address',
7
 
                    'cookie', 'score', 'date_changed')
8
 
    list_filter = ('score', 'content_type', 'date_changed')
9
 
    search_fields = ('ip_address',)
10
 
    raw_id_fields = ('user',)
11
 
 
12
 
 
13
 
class ScoreAdmin(admin.ModelAdmin):
14
 
    list_display = ('content_object', 'score', 'votes')
15
 
    list_filter = ('content_type',)
16
 
 
17
 
admin.site.register(Vote, VoteAdmin)
18
 
admin.site.register(Score, ScoreAdmin)