~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to djangoratings/admin.py

  • Committer: franku
  • Author(s): GunChleoc
  • Date: 2016-12-13 18:30:38 UTC
  • mfrom: (438.1.6 pyformat_util)
  • Revision ID: somal@arcor.de-20161213183038-5cgmvfh2fkgmoc1s
adding a script to run pyformat over the code base

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',)