Commit 417a7ca5 by Bach Dániel

firewall: fix warnings v2

parent 1d934739
......@@ -43,6 +43,7 @@ class Level(Model):
return "<%s/%s>" % (unicode(self.content_type), self.name)
class Meta:
app_label = 'acl'
unique_together = (('content_type', 'codename'),
# ('content_type', 'weight'),
# TODO find a way of temp. disabling this constr.
......@@ -63,6 +64,7 @@ class ObjectLevel(Model):
return "<%s: %s>" % (unicode(self.content_object), unicode(self.level))
class Meta:
app_label = 'acl'
unique_together = (('content_type', 'object_id', 'level'),)
......
......@@ -255,6 +255,7 @@ class Rule(models.Model):
return qs
class Meta:
app_label = 'firewall'
verbose_name = _("rule")
verbose_name_plural = _("rules")
ordering = (
......@@ -392,6 +393,7 @@ class Vlan(AclBase, models.Model):
verbose_name=_('modified at'))
class Meta:
app_label = 'firewall'
verbose_name = _("vlan")
verbose_name_plural = _("vlans")
ordering = ('vid', )
......@@ -546,6 +548,7 @@ class VlanGroup(models.Model):
verbose_name=_('modified at'))
class Meta:
app_label = 'firewall'
verbose_name = _("vlan group")
verbose_name_plural = _("vlan groups")
ordering = ('id', )
......@@ -573,6 +576,7 @@ class Group(models.Model):
verbose_name=_('modified at'))
class Meta:
app_label = 'firewall'
verbose_name = _("host group")
verbose_name_plural = _("host groups")
ordering = ('id', )
......@@ -648,6 +652,7 @@ class Host(models.Model):
verbose_name=_('modified at'))
class Meta(object):
app_label = 'firewall'
unique_together = ('hostname', 'vlan')
ordering = ('normalized_hostname', 'vlan')
......@@ -951,6 +956,7 @@ class Firewall(models.Model):
verbose_name=_('name'))
class Meta:
app_label = 'firewall'
verbose_name = _("firewall")
verbose_name_plural = _("firewalls")
ordering = ('id', )
......@@ -1002,6 +1008,7 @@ class Domain(models.Model):
description = models.TextField(blank=True, verbose_name=_('description'))
class Meta:
app_label = 'firewall'
verbose_name = _("domain")
verbose_name_plural = _("domains")
ordering = ('id', )
......@@ -1083,6 +1090,7 @@ class Record(models.Model):
return reverse('network.record', kwargs={'pk': self.pk})
class Meta:
app_label = 'firewall'
verbose_name = _("record")
verbose_name_plural = _("records")
ordering = (
......@@ -1105,6 +1113,7 @@ class SwitchPort(models.Model):
verbose_name=_('modified_at'))
class Meta:
app_label = 'firewall'
verbose_name = _("switch port")
verbose_name_plural = _("switch ports")
ordering = ('id', )
......@@ -1137,6 +1146,7 @@ class EthernetDevice(models.Model):
verbose_name=_('modified_at'))
class Meta:
app_label = 'firewall'
verbose_name = _("ethernet device")
verbose_name_plural = _("ethernet devices")
ordering = ('id', )
......@@ -1172,6 +1182,7 @@ class BlacklistItem(models.Model):
return self.ipv4
class Meta(object):
app_label = 'firewall'
verbose_name = _('blacklist item')
verbose_name_plural = _('blacklist items')
ordering = ('id', )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment