diff --git a/collection/conf/locale/fr/LC_MESSAGES/django.po b/collection/conf/locale/fr/LC_MESSAGES/django.po index 7d30992..3336f3b 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-20 20:57+0000\n" -"PO-Revision-Date: 2018-01-20 21:59+0100\n" +"POT-Creation-Date: 2018-01-21 11:36+0000\n" +"PO-Revision-Date: 2018-01-21 12:36+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -29,11 +29,19 @@ msgstr "nom court" msgid "New" msgstr "Nouveau" -#: core/models.py:49 core/models.py:82 +#: core/models.py:30 +msgid "achievement" +msgstr "progression" + +#: core/models.py:31 +msgid "out of" +msgstr "sur" + +#: core/models.py:51 core/models.py:84 msgid "status" msgstr "état" -#: core/models.py:68 +#: core/models.py:70 msgid "date" msgstr "date" @@ -232,9 +240,3 @@ msgstr "Carte mémoire" #: games/templates/games/index.html:43 msgid "Empty memory." msgstr "Mémoire vide." - -#~ msgid "console" -#~ msgstr "console" - -#~ msgid "consoles" -#~ msgstr "consoles" diff --git a/collection/core/models.py b/collection/core/models.py index 24ca680..793dd62 100644 --- a/collection/core/models.py +++ b/collection/core/models.py @@ -27,6 +27,8 @@ class Item(models.Model): DEFAULT_CHOICE = CREATED name = models.CharField(max_length=255, verbose_name=_('name')) + achievement = models.PositiveIntegerField(blank=True, null=True, verbose_name=_('achievement')) + achievement_max = models.PositiveIntegerField(blank=True, null=True, verbose_name=_('out of')) def __str__(self): return '%s' % self.name diff --git a/collection/figurines/admin.py b/collection/figurines/admin.py index 0c14a3a..dc17ea6 100644 --- a/collection/figurines/admin.py +++ b/collection/figurines/admin.py @@ -5,7 +5,8 @@ from figurines.models import Set class FigurineInline(admin.TabularInline): model = Figurine - fields = ('name', 'kind', 'wish') + fields = ('name', 'kind', 'achievement', 'achievement_max', + 'wish') extra = 2 diff --git a/collection/figurines/migrations/0005_add_achievements.py b/collection/figurines/migrations/0005_add_achievements.py new file mode 100644 index 0000000..0315bab --- /dev/null +++ b/collection/figurines/migrations/0005_add_achievements.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.9 on 2018-01-21 11:06 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('figurines', '0004_add_figurines_kind'), + ] + + operations = [ + migrations.AddField( + model_name='figurine', + name='achievement_max', + field=models.PositiveIntegerField(blank=True, null=True, + verbose_name='out of'), + ), + migrations.AddField( + model_name='figurine', + name='achievement', + field=models.PositiveIntegerField(blank=True, null=True, + verbose_name='achievement'), + ), + ] diff --git a/collection/games/admin.py b/collection/games/admin.py index 876e584..27e6466 100644 --- a/collection/games/admin.py +++ b/collection/games/admin.py @@ -63,7 +63,7 @@ class GameAdmin(admin.ModelAdmin): fieldsets = [(_('Game Information'), { 'fields': [('name', 'collection')] }), (_('Progress'), { - 'fields': [('status'), ('note')] + 'fields': [('status'), ('achievement', 'achievement_max'), ('note')] }), ('', { 'fields': [('playing'), ('unplayed'), ('wish')] })] diff --git a/collection/games/migrations/0012_add_achievements.py b/collection/games/migrations/0012_add_achievements.py new file mode 100644 index 0000000..f16712d --- /dev/null +++ b/collection/games/migrations/0012_add_achievements.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.9 on 2018-01-21 11:06 +from __future__ import unicode_literals + +import datetime +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('games', '0011_auto_20180116_1756'), + ] + + operations = [ + migrations.AddField( + model_name='game', + name='achievement_max', + field=models.PositiveIntegerField(blank=True, null=True, + verbose_name='out of'), + ), + migrations.AddField( + model_name='game', + name='achievement', + field=models.PositiveIntegerField(blank=True, null=True, + verbose_name='achievement'), + ), + ]