From 0c3a9b3be779443d184bf8bff5f33cceff589f8f Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Sun, 4 Feb 2018 14:37:16 +0100 Subject: [PATCH] =?UTF-8?q?Figurines=20:=20d=C3=A9placement=20vers=20une?= =?UTF-8?q?=20gestion=20=C3=A0=20part=20+=20filtrage/recherche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../conf/locale/fr/LC_MESSAGES/django.po | 29 ++++++++++++------- collection/figurines/admin.py | 19 ++++++++---- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/collection/conf/locale/fr/LC_MESSAGES/django.po b/collection/conf/locale/fr/LC_MESSAGES/django.po index 97a3bb5..d37c01e 100644 --- a/collection/conf/locale/fr/LC_MESSAGES/django.po +++ b/collection/conf/locale/fr/LC_MESSAGES/django.po @@ -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éé" diff --git a/collection/figurines/admin.py b/collection/figurines/admin.py index cb8c74c..1412828 100644 --- a/collection/figurines/admin.py +++ b/collection/figurines/admin.py @@ -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)