index subdomain and domain together (as they are only unique together also)
This commit is contained in:
parent
45b4216668
commit
32289ebb18
@ -177,7 +177,8 @@ class Host(models.Model):
|
|||||||
self.subdomain, self.domain.domain)
|
self.subdomain, self.domain.domain)
|
||||||
|
|
||||||
class Meta(object):
|
class Meta(object):
|
||||||
unique_together = (('subdomain', 'domain'),)
|
unique_together = (('subdomain', 'domain'), )
|
||||||
|
index_together = (('subdomain', 'domain'), )
|
||||||
|
|
||||||
def get_fqdn(self):
|
def get_fqdn(self):
|
||||||
return '%s.%s' % (self.subdomain, self.domain.domain)
|
return '%s.%s' % (self.subdomain, self.domain.domain)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user