Skip to content

Commit

Permalink
Fixes #49
Browse files Browse the repository at this point in the history
  • Loading branch information
averrin committed Aug 18, 2013
1 parent 690fa9e commit 9ce3d46
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rpg/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ def __unicode__(self):

class Title(models.Model):
name = models.CharField(max_length=40, unique=True, db_index=True)

def __unicode__(self):
return self.name


class Level(models.Model):
exp = models.IntegerField()

def __unicode__(self):
return "%s [%s]" % (self.id, self.exp)


class Hero(AbstractUser):
exp = models.IntegerField(default=0)
credits = models.IntegerField(default=0)
Expand Down Expand Up @@ -56,6 +60,3 @@ def exp_percentage(self):
return int((float(self.exp) / float(self.next_level.exp)) * 100)
else:
return 0



0 comments on commit 9ce3d46

Please sign in to comment.