mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
Added settings-dev and updated Django
This commit is contained in:
parent
6da9676299
commit
7803e3a57c
4 changed files with 21 additions and 11 deletions
|
@ -1,2 +1,2 @@
|
|||
Django==1.7.5
|
||||
Django==1.7.7
|
||||
websockify==0.6.0
|
|
@ -60,15 +60,16 @@ def instances(request):
|
|||
if connection_manager.host_is_up(comp.type, comp.hostname):
|
||||
try:
|
||||
conn = wvmHostDetails(comp, comp.login, comp.password, comp.type)
|
||||
all_host_vms[comp.id, comp.name] = conn.get_host_instances()
|
||||
for vm, info in conn.get_host_instances().items():
|
||||
try:
|
||||
check_uuid = Instance.objects.get(compute_id=comp.id, name=vm)
|
||||
if check_uuid.uuid != info['uuid']:
|
||||
if conn.get_host_instances():
|
||||
all_host_vms[comp.id, comp.name] = conn.get_host_instances()
|
||||
for vm, info in conn.get_host_instances().items():
|
||||
try:
|
||||
check_uuid = Instance.objects.get(compute_id=comp.id, name=vm)
|
||||
if check_uuid.uuid != info['uuid']:
|
||||
check_uuid.save()
|
||||
except Instance.DoesNotExist:
|
||||
check_uuid = Instance(compute_id=comp.id, name=vm, uuid=info['uuid'])
|
||||
check_uuid.save()
|
||||
except Instance.DoesNotExist:
|
||||
check_uuid = Instance(compute_id=comp.id, name=vm, uuid=info['uuid'])
|
||||
check_uuid.save()
|
||||
conn.close()
|
||||
except libvirtError as lib_err:
|
||||
error_messages.append(lib_err)
|
||||
|
|
9
webvirtcloud/settings-dev.py
Normal file
9
webvirtcloud/settings-dev.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
"""
|
||||
Django dev settings for webvirtcloud project.
|
||||
|
||||
"""
|
||||
|
||||
from settings import *
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = True
|
|
@ -8,9 +8,9 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
|||
|
||||
SECRET_KEY = '4y(f4rfqc6f2!i8_vfuu)kav6tdv5#sc=n%o451dm+th0&3uci'
|
||||
|
||||
DEBUG = True
|
||||
DEBUG = False
|
||||
|
||||
TEMPLATE_DEBUG = True
|
||||
TEMPLATE_DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
|
Loading…
Reference in a new issue