fixing vm list

This commit is contained in:
Levi 2017-05-06 18:39:19 -05:00
parent b0a27b8c75
commit e67148ff59
2 changed files with 2 additions and 2 deletions

View file

@ -107,7 +107,7 @@ class HostingManageVMAdmin(admin.ModelAdmin):
logger.error("ValueError : {0}".format(value_err)) logger.error("ValueError : {0}".format(value_err))
context = dict( context = dict(
# Include common variables for rendering the admin template. # Include common variables for rendering the admin template.
self.admin_site.each_context(request), # self.admin_site.each_context(request),
vms=vm_pool, vms=vm_pool,
) )
return context return context

View file

@ -413,7 +413,7 @@ class VirtualMachinesPlanListView(LoginRequiredMixin, ListView):
def get_queryset(self): def get_queryset(self):
hosting_admin = HostingManageVMAdmin.__new__(HostingManageVMAdmin) hosting_admin = HostingManageVMAdmin.__new__(HostingManageVMAdmin)
print(hosting_admin.show_vms(self.request)) print(hosting_admin.show_vms_view(self.request))
user = self.request.user user = self.request.user
self.queryset = VirtualMachinePlan.objects.active(user) self.queryset = VirtualMachinePlan.objects.active(user)
return super(VirtualMachinesPlanListView, self).get_queryset() return super(VirtualMachinesPlanListView, self).get_queryset()