2017-09-18 19:51:10 +00:00
|
|
|
from django.contrib import admin
|
2018-02-04 13:37:16 +00:00
|
|
|
from django.utils.translation import ugettext as _
|
2018-01-15 18:07:19 +00:00
|
|
|
from figurines.models import Figurine
|
|
|
|
from figurines.models import Set
|
2017-09-18 19:51:10 +00:00
|
|
|
|
|
|
|
|
2018-02-04 13:37:16 +00:00
|
|
|
class FigurineAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'kind', 'achievement', 'coins', 'collection')
|
|
|
|
fieldsets = [(_('Information'), {
|
|
|
|
'fields': [('name', 'kind', 'collection')]
|
|
|
|
}), (_('Progress'), {
|
|
|
|
'fields': [('achievement', 'achievement_max', 'coins')]
|
|
|
|
}), ('', {
|
|
|
|
'fields': [('wish')]
|
|
|
|
})]
|
|
|
|
list_filter = ('collection', 'kind')
|
|
|
|
search_fields = ('name', )
|
2017-09-18 19:51:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SetAdmin(admin.ModelAdmin):
|
2018-01-15 18:07:19 +00:00
|
|
|
list_display = ('shortname', 'name')
|
2017-09-18 19:51:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
admin.site.register(Set, SetAdmin)
|
2018-02-04 13:37:16 +00:00
|
|
|
admin.site.register(Figurine, FigurineAdmin)
|