Added card_type to AmiiboCard
This commit is contained in:
parent
ee4f36d36d
commit
4ae61b5d0e
|
@ -48,7 +48,9 @@ class Command(BaseCommand):
|
|||
amiibo.dice = self.dice[item['dice_value'].lower()]
|
||||
amiibo.rps = self.rps[item['rps_value'].lower()]
|
||||
|
||||
amiibo.image = self.handle_image(item['cardphoto_link'])
|
||||
amiibo.image = self.handle_image(item['cardphoto_link'])
|
||||
|
||||
amiibo.card_type = item['type_value'].lower()
|
||||
|
||||
amiibo.slug = slugify(amiibo.name_en)
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('amiibo', '0024_auto_20150908_2114'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='amiibocard',
|
||||
name='card_type',
|
||||
field=models.CharField(default=b'special', max_length=12),
|
||||
),
|
||||
]
|
|
@ -183,6 +183,7 @@ class AmiiboCard(Amiibo):
|
|||
)
|
||||
|
||||
image = models.ImageField(upload_to=image_card_upload)
|
||||
card_type = models.CharField(max_length=12, default='special')
|
||||
|
||||
dice = models.IntegerField(default=1)
|
||||
rps = models.CharField(choices=RPS_CHOICES, default=ROCK, max_length=1)
|
||||
|
|
Loading…
Reference in New Issue