Rearrange the models files into the respective levels, add DB layout for skills storage

This commit is contained in:
2010-12-07 14:50:39 +00:00
parent 86455cc123
commit 59e086e720
8 changed files with 408 additions and 202 deletions

46
eve_api/models/static.py Normal file
View File

@@ -0,0 +1,46 @@
"""
This file covers any static information from the EVE data dumps. While
using django-evedb would be a smarter choice, for the limited subset of
data we're using it isn't worth the overhead
"""
from django.db import models
class EVESkill(models.Model):
""" Represents a skill in EVE Online """
name = models.CharField(blank=True, max_length=255)
description = models.TextField(blank=True)
def __unicode__(self):
if self.name:
return self.name
else:
return u"Skill %d" % self.id
class Meta:
app_label = 'eve_api'
verbose_name = 'Character Skill'
verbose_name_plural = 'Character Skills'
class EVEPlayerCharacterRole(models.Model):
"""
Represents a role which can be applied to a character
"""
roleid = models.CharField(max_length=64, blank=False, null=False)
name = models.CharField(max_length=255, blank=False, null=False)
def __unicode__(self):
if self.name:
return self.name
else:
return u"Role %d" % self.id
class Meta:
app_label = 'eve_api'
verbose_name = 'Character Role'
verbose_name_plural = 'Character Roles'