Ajout d'une catégorisation des figurines : champ 'sorte' (kind)

This commit is contained in:
Olivier DOSSMANN 2018-01-20 22:21:22 +01:00
parent f60d7d98fd
commit b83f00609a
4 changed files with 67 additions and 9 deletions

View File

@ -7,8 +7,8 @@ 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-18 19:55+0000\n" "POT-Creation-Date: 2018-01-20 20:57+0000\n"
"PO-Revision-Date: 2018-01-15 21:10+0100\n" "PO-Revision-Date: 2018-01-20 21:59+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: fr\n" "Language: fr\n"
@ -49,23 +49,43 @@ msgstr "collections"
msgid "Usual name of figurines set." msgid "Usual name of figurines set."
msgstr "Nom habituel de la collection de figurines." 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?" msgid "wish?"
msgstr "envie de l'avoir ?" msgstr "envie de l'avoir ?"
#: figurines/models.py:37 #: figurines/models.py:54
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:44 #: figurines/models.py:61
msgid "Figurine denomination" msgid "Figurine denomination"
msgstr "Dénomination de la figurine" msgstr "Dénomination de la figurine"
#: figurines/models.py:45 #: figurines/models.py:62
msgid "Becoming set" msgid "Becoming set"
msgstr "Collection d'où cela provient" msgstr "Collection d'où cela provient"
#: figurines/models.py:46 #: figurines/models.py:63
msgid "Figurine progression" msgid "Figurine progression"
msgstr "Progression de la figurine" msgstr "Progression de la figurine"

View File

@ -5,7 +5,7 @@ from figurines.models import Set
class FigurineInline(admin.TabularInline): class FigurineInline(admin.TabularInline):
model = Figurine model = Figurine
fields = ('name', 'wish') fields = ('name', 'kind', 'wish')
extra = 2 extra = 2

View File

@ -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'),
),
]

View File

@ -29,7 +29,24 @@ class Figurine(Item):
TARGET_VERBOSE_NAME = _('set') TARGET_VERBOSE_NAME = _('set')
RELATED_TARGET_NAME = 'figurines' 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( wish = models.BooleanField(
default=False, default=False,