Figurines : déplacement vers une gestion à part + filtrage/recherche

master
Olivier DOSSMANN 2018-02-04 14:37:16 +01:00
parent 801d26cb4a
commit 0c3a9b3be7
2 changed files with 31 additions and 17 deletions

View File

@ -7,15 +7,15 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-21 14:41+0000\n"
"PO-Revision-Date: 2018-01-21 15:42+0100\n"
"POT-Creation-Date: 2018-02-04 13:26+0000\n"
"PO-Revision-Date: 2018-02-04 14:07+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.5\n"
"X-Generator: Poedit 2.0.6\n"
#: core/models.py:9 core/models.py:29
msgid "name"
@ -45,6 +45,14 @@ msgstr "état"
msgid "date"
msgstr "date"
#: figurines/admin.py:10
msgid "Information"
msgstr "Information"
#: figurines/admin.py:12 games/admin.py:65
msgid "Progress"
msgstr "Progression"
#: figurines/models.py:15 figurines/models.py:29
msgid "set"
msgstr "collection"
@ -85,19 +93,19 @@ msgstr "envie de l'avoir ?"
msgid "You need this figurine."
msgstr "Vous avez besoin de cette figurine."
#: figurines/models.py:57
#: figurines/models.py:58
msgid "coins"
msgstr "monnaie"
#: figurines/models.py:64
#: figurines/models.py:65
msgid "Figurine denomination"
msgstr "Dénomination de la figurine"
#: figurines/models.py:65
#: figurines/models.py:66
msgid "Becoming set"
msgstr "Collection d'où cela provient"
#: figurines/models.py:66
#: figurines/models.py:67
msgid "Figurine progression"
msgstr "Progression de la figurine"
@ -113,10 +121,6 @@ msgstr "plateforme"
msgid "Game Information"
msgstr "Information du jeu"
#: games/admin.py:65
msgid "Progress"
msgstr "Progression"
#: games/admin.py:79
msgid "Platform"
msgstr "Plateforme"
@ -244,3 +248,6 @@ msgstr "Carte mémoire"
#: games/templates/games/index.html:43
msgid "Empty memory."
msgstr "Mémoire vide."
#~ msgid "created"
#~ msgstr "créé"

View File

@ -1,18 +1,25 @@
from django.contrib import admin
from django.utils.translation import ugettext as _
from figurines.models import Figurine
from figurines.models import Set
class FigurineInline(admin.TabularInline):
model = Figurine
fields = ('name', 'kind', 'achievement', 'achievement_max', 'coins',
'wish')
extra = 2
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', )
class SetAdmin(admin.ModelAdmin):
list_display = ('shortname', 'name')
inlines = (FigurineInline, )
admin.site.register(Set, SetAdmin)
admin.site.register(Figurine, FigurineAdmin)