Ajout de la note de progression pour un jeu donné
This commit is contained in:
@ -35,13 +35,17 @@ class GameAdmin(admin.ModelAdmin):
|
||||
'playing',
|
||||
'wish']
|
||||
search_fields = ('name',)
|
||||
fields = [
|
||||
'name',
|
||||
'collection',
|
||||
'status',
|
||||
'playing',
|
||||
'unplayed',
|
||||
'wish'
|
||||
fieldsets = [
|
||||
(_('Game Information'), {
|
||||
'fields': [
|
||||
('name', 'collection')]}),
|
||||
(_('Progress'),
|
||||
{'fields': [
|
||||
('status'),
|
||||
('note')]}),
|
||||
('',
|
||||
{'fields': [
|
||||
('playing'), ('unplayed'), ('wish')]})
|
||||
]
|
||||
|
||||
form = GameForm
|
||||
|
33
collection/games/migrations/0004_add_game_note_field.py
Normal file
33
collection/games/migrations/0004_add_game_note_field.py
Normal file
@ -0,0 +1,33 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.4 on 2017-08-25 22:11
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('games', '0003_add_verbose_translatable_names'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='console',
|
||||
options={'ordering': ('name',), 'verbose_name': 'console', 'verbose_name_plural': 'consoles'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='game',
|
||||
options={'ordering': ('-playing', 'name'), 'verbose_name': 'jeu', 'verbose_name_plural': 'jeux'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='timeline',
|
||||
options={'ordering': ('-date',), 'verbose_name': 'Chronologie', 'verbose_name_plural': 'Chronologies'},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='game',
|
||||
name='note',
|
||||
field=models.CharField(help_text='Short note displayed to your followers.', max_length=150, null=True, verbose_name='Progress note'),
|
||||
),
|
||||
]
|
@ -41,6 +41,13 @@ class Game(Item):
|
||||
)
|
||||
DEFAULT_CHOICE = UNFINISHED
|
||||
|
||||
# progression
|
||||
note = models.CharField(
|
||||
max_length=150,
|
||||
null=True,
|
||||
verbose_name=_('Progress note'),
|
||||
help_text=_('Short note displayed to your followers.'))
|
||||
|
||||
# others
|
||||
playing = models.BooleanField(
|
||||
default=False,
|
||||
|
Reference in New Issue
Block a user