Ayant besoin de connaître la fortune de chaque figurine, j'ai ajouté 'coins'
This commit is contained in:
@ -5,7 +5,7 @@ from figurines.models import Set
|
||||
|
||||
class FigurineInline(admin.TabularInline):
|
||||
model = Figurine
|
||||
fields = ('name', 'kind', 'achievement', 'achievement_max',
|
||||
fields = ('name', 'kind', 'achievement', 'achievement_max', 'coins',
|
||||
'wish')
|
||||
extra = 2
|
||||
|
||||
|
22
collection/figurines/migrations/0006_add_coins.py
Normal file
22
collection/figurines/migrations/0006_add_coins.py
Normal file
@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.9 on 2018-01-21 14:40
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('figurines', '0005_add_achievements'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='figurine',
|
||||
name='coins',
|
||||
field=models.PositiveIntegerField(default=0, null=True, blank=True,
|
||||
verbose_name='coins'),
|
||||
),
|
||||
]
|
@ -53,6 +53,10 @@ class Figurine(Item):
|
||||
verbose_name=_('wish?'),
|
||||
help_text=_('You need this figurine.'))
|
||||
|
||||
# How money does your figurine have?
|
||||
coins = models.PositiveIntegerField(default=0, null=True, blank=True,
|
||||
verbose_name=_('coins'))
|
||||
|
||||
class Meta:
|
||||
ordering = ('name',)
|
||||
|
||||
|
Reference in New Issue
Block a user