Commit 38144860 by Kálmán Viktor

network: default ordering for records

parent 9a7736ad
...@@ -278,9 +278,6 @@ class Vlan(models.Model): ...@@ -278,9 +278,6 @@ class Vlan(models.Model):
def prefix6(self): def prefix6(self):
return self.network6.prefixlen return self.network6.prefixlen
def __unicode__(self):
return self.name
class VlanGroup(models.Model): class VlanGroup(models.Model):
""" """
...@@ -741,6 +738,12 @@ class Record(models.Model): ...@@ -741,6 +738,12 @@ class Record(models.Model):
def get_absolute_url(self): def get_absolute_url(self):
return ('network.record', None, {'pk': self.pk}) return ('network.record', None, {'pk': self.pk})
class Meta:
ordering = (
'domain',
'name',
)
class Blacklist(models.Model): class Blacklist(models.Model):
CHOICES_type = (('permban', 'permanent ban'), ('tempban', 'temporary ban'), CHOICES_type = (('permban', 'permanent ban'), ('tempban', 'temporary ban'),
......
...@@ -97,7 +97,7 @@ class RecordTable(Table): ...@@ -97,7 +97,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):
...@@ -108,7 +108,7 @@ class SmallRecordTable(Table): ...@@ -108,7 +108,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
......
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