Card rarity support

This commit is contained in:
Correl Roush 2010-09-21 15:46:28 -04:00
parent 15bf001831
commit 559958b193
2 changed files with 3 additions and 1 deletions

View File

@ -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):

View File

@ -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()