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

View File

@ -1,18 +1,25 @@
from django.contrib import admin from django.contrib import admin
from django.utils.translation import ugettext as _
from figurines.models import Figurine from figurines.models import Figurine
from figurines.models import Set from figurines.models import Set
class FigurineInline(admin.TabularInline): class FigurineAdmin(admin.ModelAdmin):
model = Figurine list_display = ('name', 'kind', 'achievement', 'coins', 'collection')
fields = ('name', 'kind', 'achievement', 'achievement_max', 'coins', fieldsets = [(_('Information'), {
'wish') 'fields': [('name', 'kind', 'collection')]
extra = 2 }), (_('Progress'), {
'fields': [('achievement', 'achievement_max', 'coins')]
}), ('', {
'fields': [('wish')]
})]
list_filter = ('collection', 'kind')
search_fields = ('name', )
class SetAdmin(admin.ModelAdmin): class SetAdmin(admin.ModelAdmin):
list_display = ('shortname', 'name') list_display = ('shortname', 'name')
inlines = (FigurineInline, )
admin.site.register(Set, SetAdmin) admin.site.register(Set, SetAdmin)
admin.site.register(Figurine, FigurineAdmin)