diff --git a/collection/conf/locale/fr/LC_MESSAGES/django.po b/collection/conf/locale/fr/LC_MESSAGES/django.po index 24b47b3..7d30992 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-18 19:55+0000\n" -"PO-Revision-Date: 2018-01-15 21:10+0100\n" +"POT-Creation-Date: 2018-01-20 20:57+0000\n" +"PO-Revision-Date: 2018-01-20 21:59+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -49,23 +49,43 @@ msgstr "collections" msgid "Usual name of figurines set." msgstr "Nom habituel de la collection de figurines." -#: figurines/models.py:36 games/models.py:67 +#: figurines/models.py:40 +msgid "Character" +msgstr "Personnage" + +#: figurines/models.py:41 +msgid "Vehicle" +msgstr "Véhicule" + +#: figurines/models.py:42 +msgid "World" +msgstr "Monde" + +#: figurines/models.py:43 +msgid "Gadget" +msgstr "Gadget" + +#: figurines/models.py:49 +msgid "kind" +msgstr "sorte" + +#: figurines/models.py:53 games/models.py:67 msgid "wish?" msgstr "envie de l'avoir ?" -#: figurines/models.py:37 +#: figurines/models.py:54 msgid "You need this figurine." msgstr "Vous avez besoin de cette figurine." -#: figurines/models.py:44 +#: figurines/models.py:61 msgid "Figurine denomination" msgstr "Dénomination de la figurine" -#: figurines/models.py:45 +#: figurines/models.py:62 msgid "Becoming set" msgstr "Collection d'où cela provient" -#: figurines/models.py:46 +#: figurines/models.py:63 msgid "Figurine progression" msgstr "Progression de la figurine" diff --git a/collection/figurines/admin.py b/collection/figurines/admin.py index 1dce616..0c14a3a 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', 'wish') + fields = ('name', 'kind', 'wish') extra = 2 diff --git a/collection/figurines/migrations/0004_add_figurines_kind.py b/collection/figurines/migrations/0004_add_figurines_kind.py new file mode 100644 index 0000000..f55c114 --- /dev/null +++ b/collection/figurines/migrations/0004_add_figurines_kind.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.9 on 2018-01-20 20:54 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('figurines', '0003_auto_20180116_1756'), + ] + + operations = [ + migrations.AddField( + model_name='figurine', + name='kind', + field=models.CharField(choices=[('character', 'Character'), ('vehicle', 'Vehicle'), ('world', 'World'), ('gadget', 'Gadget')], default='character', max_length=30, verbose_name='kind'), + ), + ] diff --git a/collection/figurines/models.py b/collection/figurines/models.py index 77fc37e..21a628a 100644 --- a/collection/figurines/models.py +++ b/collection/figurines/models.py @@ -29,7 +29,24 @@ class Figurine(Item): TARGET_VERBOSE_NAME = _('set') RELATED_TARGET_NAME = 'figurines' - # No more status choices thant "CREATED" + # No more status choices than "CREATED" + + # Figurines can be Character, vehicle, world or gadget (weapon) + CHARACTER = 'character' + VEHICLE = 'vehicle' + WORLD = 'world' + GADGET = 'gadget' + KIND_CHOICES = ( + (CHARACTER, _('Character')), + (VEHICLE, _('Vehicle')), + (WORLD, _('World')), + (GADGET, _('Gadget')), + ) + kind = models.CharField( + max_length=30, + choices=KIND_CHOICES, + default=CHARACTER, + verbose_name=_('kind')) wish = models.BooleanField( default=False,