Switch over to using ApplicationConfig as the backend for HR configuration

This commit is contained in:
2011-05-26 10:25:45 +01:00
parent e5e3e14160
commit ab86e0a550
8 changed files with 577 additions and 5 deletions

View File

@@ -153,3 +153,18 @@ class Blacklist(models.Model):
def __unicode__(self):
return u'%s: %s' % (self.get_type_display(), self.value)
class ApplicationConfig(models.Model):
""" Defines configuration settings for applications """
corporation = models.OneToOneField(EVEPlayerCorporation, blank=False, verbose_name="Corporation", related_name="application_config")
is_accepting = models.BooleanField(verbose_name="Accepting Applications",
help_text="Defines if the corporation is accepting applications")
api_required = models.IntegerField(choices=API_KEYTYPE_CHOICES, default=1, verbose_name="Minimum API Key Level",
help_text="This defines the minimum level of API needed to create a application")
api_view = models.BooleanField(verbose_name="View Applicant APIs",
help_text="This allows HR staff to see the applicant's API keys")
def __unicode__(self):
return u'%s' % corporation