From bd2edf599ae4b8e02cc43167821d9bf3adac75e3 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 6 Aug 2017 15:08:05 +0200 Subject: [PATCH] Merged views from master --- datacenterlight/views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index b2798844..e37b2914 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -17,7 +17,6 @@ from utils.models import BillingAddress from hosting.models import HostingOrder from utils.stripe_utils import StripeUtils from membership.models import CustomUser, StripeCustomer - from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineTemplateSerializer, VirtualMachineSerializer, VMTemplateSerializer from datacenterlight.tasks import create_vm_task @@ -195,15 +194,15 @@ class IndexView(CreateView): def validate_cores(self, value): if (value > 48) or (value < 1): - raise ValidationError(_('Not a proper cores number')) + raise ValidationError(_('Invalid number of cores')) def validate_memory(self, value): if (value > 200) or (value < 2): - raise ValidationError(_('Not a proper ram number')) + raise ValidationError(_('Invalid RAM size')) def validate_storage(self, value): if (value > 2000) or (value < 10): - raise ValidationError(_('Not a proper storage number')) + raise ValidationError(_('Invalid storage size')) @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs):