Added meta information for SSO models

This commit is contained in:
2010-09-30 11:16:23 +01:00
parent 5ecb1cc04e
commit 7e5b9771a7

View File

@@ -128,6 +128,11 @@ class SSOUserNote(models.Model):
verbose_name="Date/Time the note was added", verbose_name="Date/Time the note was added",
help_text="Shows the date and time the note was added to the account") help_text="Shows the date and time the note was added to the account")
class Meta:
verbose_name = 'User Note'
verbose_name_plural = 'User Notes'
ordering = ['date_created']
class Service(models.Model): class Service(models.Model):
""" """
@@ -142,6 +147,11 @@ class Service(models.Model):
groups = models.ManyToManyField(Group, blank=False) groups = models.ManyToManyField(Group, blank=False)
settings_json = JSONField("Service Settings", blank=True) settings_json = JSONField("Service Settings", blank=True)
class Meta:
verbose_name = 'Service'
verbose_name_plural = 'Services'
ordering = ['id']
@property @property
def provide_login(self): def provide_login(self):
return self.settings['provide_login'] return self.settings['provide_login']
@@ -197,6 +207,11 @@ class ServiceAccount(models.Model):
username = None username = None
password = None password = None
class Meta:
verbose_name = 'Service Account'
verbose_name_plural = 'Service Accounts'
ordering = ['user']
def __str__(self): def __str__(self):
return "%s: %s (%s)" % (self.service.name, self.user.username, self.service_uid) return "%s: %s (%s)" % (self.service.name, self.user.username, self.service_uid)