index subdomain and domain together (as they are only unique together also)

This commit is contained in:
Thomas Waldmann 2014-05-29 17:19:08 +02:00
parent 45b4216668
commit 32289ebb18

View File

@ -178,6 +178,7 @@ class Host(models.Model):
class Meta(object):
unique_together = (('subdomain', 'domain'), )
index_together = (('subdomain', 'domain'), )
def get_fqdn(self):
return '%s.%s' % (self.subdomain, self.domain.domain)