Card rarity support
This commit is contained in:
parent
15bf001831
commit
559958b193
2 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@ class Card(models.Model, mtg.Card):
|
|||
converted_cost = models.IntegerField(default=0)
|
||||
power = models.CharField(max_length=10)
|
||||
toughness = models.CharField(max_length=10)
|
||||
rarity = models.CharField(max_length=1)
|
||||
text = models.TextField()
|
||||
|
||||
def __unicode__(self):
|
||||
|
|
|
@ -20,6 +20,7 @@ def dbimport():
|
|||
card = Card(name=c.name, type=card_type,cost=c.cost, power=c.power, toughness=c.toughness)
|
||||
|
||||
card.converted_cost = c.cost.converted()
|
||||
card.rarity = c.rarity
|
||||
card.text = "\n".join(c.text)
|
||||
card.save()
|
||||
attributes = []
|
||||
|
@ -46,5 +47,5 @@ def deckimport():
|
|||
c.count += 1
|
||||
c.save()
|
||||
|
||||
#dbimport()
|
||||
dbimport()
|
||||
deckimport()
|
||||
|
|
Loading…
Reference in a new issue