diff --git a/collection/collection/locale/fr/LC_MESSAGES/django.po b/collection/collection/locale/fr/LC_MESSAGES/django.po index dfa3bbc..e481e34 100644 --- a/collection/collection/locale/fr/LC_MESSAGES/django.po +++ b/collection/collection/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-18 19:39+0000\n" +"POT-Creation-Date: 2018-01-15 17:37+0000\n" "PO-Revision-Date: 2017-09-16 17:16+0200\n" "Last-Translator: Olivier DOSSMANN \n" "Language-Team: \n" diff --git a/collection/conf/locale/fr/LC_MESSAGES/django.po b/collection/conf/locale/fr/LC_MESSAGES/django.po index 97c19e2..55a266d 100644 --- a/collection/conf/locale/fr/LC_MESSAGES/django.po +++ b/collection/conf/locale/fr/LC_MESSAGES/django.po @@ -7,29 +7,33 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-18 19:39+0000\n" -"PO-Revision-Date: 2017-09-18 21:23+0200\n" +"POT-Creation-Date: 2018-01-15 17:37+0000\n" +"PO-Revision-Date: 2018-01-15 18:38+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.3\n" +"X-Generator: Poedit 2.0.5\n" -#: core/models.py:7 core/models.py:28 +#: core/models.py:7 core/models.py:29 msgid "name" msgstr "nom" -#: core/models.py:24 +#: core/models.py:8 +msgid "shortname" +msgstr "nom court" + +#: core/models.py:25 msgid "New" msgstr "Nouveau" -#: core/models.py:48 core/models.py:80 +#: core/models.py:49 core/models.py:81 msgid "status" msgstr "état" -#: core/models.py:65 +#: core/models.py:66 msgid "date" msgstr "date" diff --git a/collection/core/models.py b/collection/core/models.py index 8b625f1..e62f89c 100644 --- a/collection/core/models.py +++ b/collection/core/models.py @@ -1,10 +1,12 @@ from datetime import datetime + from django.db import models from django.utils.translation import ugettext as _ class Collection(models.Model): name = models.CharField(max_length=255, verbose_name=_('name')) + shortname = models.CharField(max_length=30, verbose_name=_('shortname')) def __str__(self): return '%s' % self.name @@ -20,9 +22,7 @@ class Item(models.Model): # status choices CREATED = 'created' - STATUS_CHOICES = ( - (CREATED, _('New')), - ) + STATUS_CHOICES = ((CREATED, _('New')), ) DEFAULT_CHOICE = CREATED name = models.CharField(max_length=255, verbose_name=_('name')) @@ -70,8 +70,7 @@ class Timeline(models.Model): Add new field 'item' which is a link to TARGET_MODEL """ target_field = models.ForeignKey( - cls.TARGET_MODEL, - verbose_name=_(cls.TARGET_VERBOSE_NAME)) + cls.TARGET_MODEL, verbose_name=_(cls.TARGET_VERBOSE_NAME)) target_field.contribute_to_class(cls, 'item') status_field = models.CharField( max_length=30, @@ -81,11 +80,9 @@ class Timeline(models.Model): status_field.contribute_to_class(cls, 'status') def __str__(self): - return '%s: %s - %s' % ( - self.date.strftime('%Y-%m-%d'), - self.status, - self.item) + return '%s: %s - %s' % (self.date.strftime('%Y-%m-%d'), self.status, + self.item) class Meta: abstract = True - ordering = ('-date',) + ordering = ('-date', ) diff --git a/collection/figurines/fixtures/initial.yaml b/collection/figurines/fixtures/initial.yaml index d8a1bdc..3ee4ec4 100644 --- a/collection/figurines/fixtures/initial.yaml +++ b/collection/figurines/fixtures/initial.yaml @@ -2,15 +2,19 @@ pk: 1 fields: name: Amiibo + shortname: Amiibo - model: figurines.set pk: 2 fields: name: Disney Infinity + shortname: Infinity - model: figurines.set pk: 3 fields: name: Lego Dimensions + shortname: LD - model: figurines.set pk: 4 fields: - name: Skylanders + name: "Skylanders Serie 1: Spyro's adventure" + shortname: Skylanders diff --git a/collection/figurines/migrations/0002_auto_20180115_1730.py b/collection/figurines/migrations/0002_auto_20180115_1730.py new file mode 100644 index 0000000..2aac175 --- /dev/null +++ b/collection/figurines/migrations/0002_auto_20180115_1730.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.9 on 2018-01-15 17:30 +from __future__ import unicode_literals + +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ('figurines', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='set', + name='shortname', + field=models.CharField( + default='TODO: Add shortname', + max_length=30, + verbose_name='shortname'), ), + ] diff --git a/collection/games/fixtures/initial.yaml b/collection/games/fixtures/initial.yaml index 96966bc..8b41e7d 100644 --- a/collection/games/fixtures/initial.yaml +++ b/collection/games/fixtures/initial.yaml @@ -2,43 +2,54 @@ pk: 1 fields: name: Steam + shortname: Steam - model: games.platform pk: 2 fields: name: Game Boy + shortname: Game Boy - model: games.platform pk: 3 fields: name: Nintendo 3DS + shortname: 3DS - model: games.platform pk: 4 fields: name: Nintendo Switch + shortname: Switch - model: games.platform pk: 5 fields: name: PC + shortname: PC - model: games.platform pk: 6 fields: name: Genesis / Mega Drive + shortname: GEN - model: games.platform pk: 7 fields: name: Nintendo Entertainment System + shortname: NES - model: games.platform pk: 8 fields: name: PlayStation + shortname: PS - model: games.platform pk: 9 fields: name: PlayStation 3 + shortname: PS3 - model: games.platform pk: 10 fields: name: PlayStation 4 + shortname: PS4 - model: games.platform pk: 11 fields: name: Wii + shortname: Wii diff --git a/collection/games/migrations/0010_auto_20180115_1730.py b/collection/games/migrations/0010_auto_20180115_1730.py new file mode 100644 index 0000000..e214774 --- /dev/null +++ b/collection/games/migrations/0010_auto_20180115_1730.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.9 on 2018-01-15 17:30 +from __future__ import unicode_literals + +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ('games', '0009_add_help_text_for_documentation'), + ] + + operations = [ + migrations.AddField( + model_name='platform', + name='shortname', + field=models.CharField( + default='TODO: Add shortname', + max_length=30, + verbose_name='shortname'), ), + ]