From 090376f1e3fb78de875bda47003a2ccad39f85b7 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Sun, 21 Jan 2018 15:47:33 +0100 Subject: [PATCH] =?UTF-8?q?Ayant=20besoin=20de=20conna=C3=AEtre=20la=20for?= =?UTF-8?q?tune=20de=20chaque=20figurine,=20j'ai=20ajout=C3=A9=20'coins'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../conf/locale/fr/LC_MESSAGES/django.po | 14 +++++++----- collection/figurines/admin.py | 2 +- .../figurines/migrations/0006_add_coins.py | 22 +++++++++++++++++++ collection/figurines/models.py | 4 ++++ 4 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 collection/figurines/migrations/0006_add_coins.py diff --git a/collection/conf/locale/fr/LC_MESSAGES/django.po b/collection/conf/locale/fr/LC_MESSAGES/django.po index 3336f3b..97a3bb5 100644 --- a/collection/conf/locale/fr/LC_MESSAGES/django.po +++ b/collection/conf/locale/fr/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-21 11:36+0000\n" -"PO-Revision-Date: 2018-01-21 12:36+0100\n" +"POT-Creation-Date: 2018-01-21 14:41+0000\n" +"PO-Revision-Date: 2018-01-21 15:42+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -85,15 +85,19 @@ msgstr "envie de l'avoir ?" msgid "You need this figurine." msgstr "Vous avez besoin de cette figurine." -#: figurines/models.py:61 +#: figurines/models.py:57 +msgid "coins" +msgstr "monnaie" + +#: figurines/models.py:64 msgid "Figurine denomination" msgstr "Dénomination de la figurine" -#: figurines/models.py:62 +#: figurines/models.py:65 msgid "Becoming set" msgstr "Collection d'où cela provient" -#: figurines/models.py:63 +#: figurines/models.py:66 msgid "Figurine progression" msgstr "Progression de la figurine" diff --git a/collection/figurines/admin.py b/collection/figurines/admin.py index dc17ea6..cb8c74c 100644 --- a/collection/figurines/admin.py +++ b/collection/figurines/admin.py @@ -5,7 +5,7 @@ from figurines.models import Set class FigurineInline(admin.TabularInline): model = Figurine - fields = ('name', 'kind', 'achievement', 'achievement_max', + fields = ('name', 'kind', 'achievement', 'achievement_max', 'coins', 'wish') extra = 2 diff --git a/collection/figurines/migrations/0006_add_coins.py b/collection/figurines/migrations/0006_add_coins.py new file mode 100644 index 0000000..c4a1928 --- /dev/null +++ b/collection/figurines/migrations/0006_add_coins.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.9 on 2018-01-21 14:40 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('figurines', '0005_add_achievements'), + ] + + operations = [ + migrations.AddField( + model_name='figurine', + name='coins', + field=models.PositiveIntegerField(default=0, null=True, blank=True, + verbose_name='coins'), + ), + ] diff --git a/collection/figurines/models.py b/collection/figurines/models.py index 21a628a..94161d2 100644 --- a/collection/figurines/models.py +++ b/collection/figurines/models.py @@ -53,6 +53,10 @@ class Figurine(Item): verbose_name=_('wish?'), help_text=_('You need this figurine.')) + # How money does your figurine have? + coins = models.PositiveIntegerField(default=0, null=True, blank=True, + verbose_name=_('coins')) + class Meta: ordering = ('name',)