openbackloggery/collection/games/admin.py

31 lines
628 B
Python
Raw Normal View History

2017-08-16 20:00:41 +00:00
from django.contrib import admin
from games.models import Console, Game, Timeline
2017-08-16 20:00:41 +00:00
class GameAdmin(admin.ModelAdmin):
list_display = (
'name', 'playing', 'status', 'wish')
list_filter = [
'status',
'playing',
'wish']
search_fields = ('name',)
fields = [
'name',
'collection',
'status',
'playing',
'unplayed',
'wish'
]
class TimelineAdmin(admin.ModelAdmin):
list_display = (
'date', 'status', 'item')
2017-08-16 20:00:41 +00:00
admin.site.register(Console)
admin.site.register(Game, GameAdmin)
admin.site.register(Timeline, TimelineAdmin)