Import Skill information from the API, also provide new Auth API to access this information

This commit is contained in:
2010-12-07 16:41:47 +00:00
parent 98ed469373
commit 186dd199be
11 changed files with 429 additions and 8 deletions

View File

@@ -51,7 +51,11 @@ class EVEPlayerCharacterSkill(models.Model):
"""
character = models.ForeignKey('eve_api.EVEPlayerCharacter')
skill = models.ForeignKey('eve_api.EVESkill')
level = models.IntegerField()
level = models.IntegerField(default=0)
skillpoints = models.IntegerField(default=0)
def __unicode__(self):
return u"%s - Level %s" % (self.skill, self.level)
class Meta:
app_label = 'eve_api'

View File

@@ -11,6 +11,7 @@ class EVESkill(models.Model):
""" Represents a skill in EVE Online """
name = models.CharField(blank=True, max_length=255)
group = models.ForeignKey('eve_api.EVESkillGroup', null=True)
description = models.TextField(blank=True)
def __unicode__(self):
@@ -25,6 +26,23 @@ class EVESkill(models.Model):
verbose_name_plural = 'Character Skills'
class EVESkillGroup(models.Model):
""" Represents a skill group in EVE Online """
name = models.CharField(blank=True, max_length=255)
def __unicode__(self):
if self.name:
return self.name
else:
return u"Skill Group %d" % self.id
class Meta:
app_label = 'eve_api'
verbose_name = 'Character Skill Group'
verbose_name_plural = 'Character Skill Groups'
class EVEPlayerCharacterRole(models.Model):
"""
Represents a role which can be applied to a character