Commit 38144860 by Kálmán Viktor

network: default ordering for records

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