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