Commit c5254b04 by Kálmán Viktor

network: add vlan groups to index

parent 26220312
......@@ -295,7 +295,7 @@ class VlanGroup(models.Model):
@models.permalink
def get_absolute_url(self):
return ('network.vlangroup', None, {'pk': self.pk})
return ('network.vlan_group', None, {'pk': self.pk})
class Group(models.Model):
......
......@@ -33,11 +33,12 @@ class IndexView(TemplateView):
hosts = Host.objects.all().order_by('-modified_at')[:size]
records = Record.objects.all().order_by('-modified_at')[:size]
vlans = Vlan.objects.all().order_by('-modified_at')[:size]
vlangroups = VlanGroup.objects.all().order_by('-modified_at')[:size]
rules = Rule.objects.all().order_by('-modified_at')[:size]
result_list = []
for i in (sorted(chain(blacklists, domains, groups, hosts,
records, vlans, rules),
records, vlans, vlangroups, rules),
key=lambda x: x.modified_at, reverse=True)[:size]):
result_list.append(
{
......
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