Commit 828b5255 by Bach Dániel

fix flake8 errors

parent 7e278a2c
...@@ -30,7 +30,7 @@ admin.autodiscover() ...@@ -30,7 +30,7 @@ admin.autodiscover()
urlpatterns = patterns( urlpatterns = patterns(
'', '',
#url(r'^$', TemplateView.as_view(template_name='base.html')), # url(r'^$', TemplateView.as_view(template_name='base.html')),
# Examples: # Examples:
# url(r'^$', 'circle.views.home', name='home'), # url(r'^$', 'circle.views.home', name='home'),
......
...@@ -52,7 +52,7 @@ class Rule(models.Model): ...@@ -52,7 +52,7 @@ class Rule(models.Model):
Others set address translation or other free-form iptables parameters. Others set address translation or other free-form iptables parameters.
""" """
CHOICES_type = (('host', 'host'), ('firewall', 'firewall'), CHOICES_type = (('host', 'host'), ('firewall', 'firewall'),
('vlan', 'vlan')) ('vlan', 'vlan'))
CHOICES_proto = (('tcp', 'tcp'), ('udp', 'udp'), ('icmp', 'icmp')) CHOICES_proto = (('tcp', 'tcp'), ('udp', 'udp'), ('icmp', 'icmp'))
CHOICES_dir = (('out', _('out')), ('in', _('in'))) CHOICES_dir = (('out', _('out')), ('in', _('in')))
CHOICES_action = (('accept', _('accept')), ('drop', _('drop')), CHOICES_action = (('accept', _('accept')), ('drop', _('drop')),
...@@ -820,7 +820,7 @@ class Domain(models.Model): ...@@ -820,7 +820,7 @@ class Domain(models.Model):
class Record(models.Model): class Record(models.Model):
CHOICES_type = (('A', 'A'), ('CNAME', 'CNAME'), ('AAAA', 'AAAA'), CHOICES_type = (('A', 'A'), ('CNAME', 'CNAME'), ('AAAA', 'AAAA'),
('MX', 'MX'), ('NS', 'NS'), ('PTR', 'PTR'), ('TXT', 'TXT')) ('MX', 'MX'), ('NS', 'NS'), ('PTR', 'PTR'), ('TXT', 'TXT'))
name = models.CharField(max_length=40, validators=[val_domain], name = models.CharField(max_length=40, validators=[val_domain],
blank=True, null=True, verbose_name=_('name')) blank=True, null=True, verbose_name=_('name'))
domain = models.ForeignKey('Domain', verbose_name=_('domain')) domain = models.ForeignKey('Domain', verbose_name=_('domain'))
......
...@@ -319,7 +319,7 @@ class ReloadTestCase(TestCase): ...@@ -319,7 +319,7 @@ class ReloadTestCase(TestCase):
'tcp', public=1000, private=22) 'tcp', public=1000, private=22)
def test_periodic_task(self): def test_periodic_task(self):
#TODO # TODO
with patch('firewall.tasks.local_tasks.cache') as cache: with patch('firewall.tasks.local_tasks.cache') as cache:
self.test_host_add_port() self.test_host_add_port()
self.test_host_add_port2() self.test_host_add_port2()
......
...@@ -120,7 +120,7 @@ class RecordTable(Table): ...@@ -120,7 +120,7 @@ class RecordTable(Table):
fields = ('type', 'fqdn', 'host', 'address', 'ttl', 'host', fields = ('type', 'fqdn', 'host', 'address', 'ttl', 'host',
'owner', ) 'owner', )
sequence = ('type', 'fqdn', ) sequence = ('type', 'fqdn', )
#order_by = 'name' # order_by = 'name'
class SmallRecordTable(Table): class SmallRecordTable(Table):
...@@ -131,7 +131,7 @@ class SmallRecordTable(Table): ...@@ -131,7 +131,7 @@ class SmallRecordTable(Table):
attrs = {'class': 'table table-striped table-bordered'} attrs = {'class': 'table table-striped table-bordered'}
fields = ('type', 'fqdn', 'host', 'address', ) fields = ('type', 'fqdn', 'host', 'address', )
sequence = ('type', 'fqdn', ) sequence = ('type', 'fqdn', )
#order_by = '-type' # order_by = '-type'
orderable = False orderable = False
......
...@@ -55,8 +55,8 @@ class NamedBaseResourceConfig(BaseResourceConfigModel, TimeStampedModel): ...@@ -55,8 +55,8 @@ class NamedBaseResourceConfig(BaseResourceConfigModel, TimeStampedModel):
"""Pre-created, named base resource configurations. """Pre-created, named base resource configurations.
""" """
name = CharField(max_length=50, unique=True, name = CharField(max_length=50, unique=True,
verbose_name=_('name'), help_text= verbose_name=_('name'),
_('Name of base resource configuration.')) help_text=_('Name of base resource configuration.'))
class Meta: class Meta:
app_label = 'vm' app_label = 'vm'
......
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