From 51fa237dd0f0f185b8ce20f46eb42c21f41c916a Mon Sep 17 00:00:00 2001 From: fmnisme Date: Tue, 31 Mar 2015 18:25:56 +0800 Subject: [PATCH 1/2] fix bug: error STATIC_ROOT config. --- webvirtmgr/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webvirtmgr/settings.py b/webvirtmgr/settings.py index 29f6b913..c5858dcb 100644 --- a/webvirtmgr/settings.py +++ b/webvirtmgr/settings.py @@ -64,7 +64,7 @@ # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/var/www/example.com/static/" -STATIC_ROOT = os.path.join(os.path.dirname(__file__), '..', 'static') +STATIC_ROOT = os.path.join(os.path.dirname(__file__), 'static') # URL prefix for static files. # Example: "http://example.com/static/", "http://static.example.com/" From 33bdaa9b1dd841600d87bb84abc480c25baa8fe1 Mon Sep 17 00:00:00 2001 From: fmnisme Date: Tue, 31 Mar 2015 18:27:23 +0800 Subject: [PATCH 2/2] fix bug: use OrderedDict replace {} for volumes. --- create/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/create/views.py b/create/views.py index e9eda148..4a7c8176 100755 --- a/create/views.py +++ b/create/views.py @@ -14,6 +14,7 @@ from vrtManager import util from create.forms import FlavorAddForm, NewVMForm +from collections import OrderedDict def create(request, host_id): """ @@ -84,7 +85,7 @@ def create(request, host_id): except libvirtError as err: errors.append(err.message) if 'create' in request.POST: - volumes = {} + volumes = OrderedDict() form = NewVMForm(request.POST) if form.is_valid(): data = form.cleaned_data