From a427fa8579d8631be27c932ad96b603679d9f35f Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 23 Apr 2017 22:24:41 +0530 Subject: [PATCH] Renamed 'manage vmss' model names so that we have a nice name --- hosting/admin.py | 6 +++--- hosting/models.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hosting/admin.py b/hosting/admin.py index e441c4ac..c5064b72 100644 --- a/hosting/admin.py +++ b/hosting/admin.py @@ -15,7 +15,7 @@ import socket from oca.exceptions import OpenNebulaException from .forms import HostingOrderAdminForm -from .models import VirtualMachineType, VirtualMachinePlan, HostingOrder, ManageVMs +from .models import VirtualMachineType, VirtualMachinePlan, HostingOrder, ManageVM class HostingOrderAdmin(admin.ModelAdmin): # fields = ('slug', 'imdb_link', 'start', 'finish', 'added_by') @@ -101,7 +101,7 @@ class VirtualMachinePlanAdmin(admin.ModelAdmin): email.send() obj.save() -class HostingManageVMsAdmin(admin.ModelAdmin): +class HostingManageVMAdmin(admin.ModelAdmin): client = None def get_urls(self): urls = super().get_urls() @@ -259,4 +259,4 @@ user_logged_in.connect(user_logged_in_callback) admin.site.register(HostingOrder, HostingOrderAdmin) admin.site.register(VirtualMachineType) admin.site.register(VirtualMachinePlan, VirtualMachinePlanAdmin) -admin.site.register(ManageVMs, HostingManageVMsAdmin) +admin.site.register(ManageVM, HostingManageVMAdmin) diff --git a/hosting/models.py b/hosting/models.py index f1f8314c..bdcb673a 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -224,7 +224,7 @@ class HostingOrder(AssignPermissionsMixin, models.Model): self.save() -class ManageVMs(models.Model): +class ManageVM(models.Model): #name = models.TextField(blank=True) def has_add_permission(self, request): return False