diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-02-09 14:46:00 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-02-09 14:46:00 +0800 |
commit | 03e6805254c20488fd5d8fa08f3132a1b2df2c8a (patch) | |
tree | c0fcfa456fc934c2bb5200db0c4600e176267764 | |
parent | aaab856ff0d985a7cf2dee20de98b737622a03d9 (diff) |
Fix vfc-ztevnfmdriver settings issues
Change-Id: If8952edad75cbd39341d1ca5789e8304ed68e88a
Issue-ID: VFC-736
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r-- | zte/vmanager/driver/settings.py | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/zte/vmanager/driver/settings.py b/zte/vmanager/driver/settings.py index 23750ee7..0a52f839 100644 --- a/zte/vmanager/driver/settings.py +++ b/zte/vmanager/driver/settings.py @@ -16,7 +16,6 @@ import os import sys # Build paths inside the project like this: os.path.join(BASE_DIR, ...) -from driver.pub.config import config BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -65,29 +64,15 @@ WSGI_APPLICATION = 'driver.wsgi.application' REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( - 'rest_framework.renderers.JSONRenderer',), + 'rest_framework.renderers.JSONRenderer', + ), 'DEFAULT_PARSER_CLASSES': ( + 'rest_framework.parsers.JSONParser', 'rest_framework.parsers.MultiPartParser', - 'rest_framework.parsers.JSONParser')} -""" -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'vmanager', - 'HOST': 'localhost', - 'USER': 'root', - 'PASSWORD':'password', - }, + ) } -redis_client = redis.StrictRedis(host='127.0.0.1', port=6379, password='', db=1) -""" -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), }} - # drf-yasg TEMPLATES = [ { @@ -112,6 +97,13 @@ SWAGGER_SETTINGS = { 'DEFAULT_INFO': 'driver.swagger.urls.swagger_info' } +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ':memory:', + }, +} + TIME_ZONE = 'UTC' # Static files (CSS, JavaScript, Images) @@ -127,7 +119,8 @@ LOGGING = { 'format': '%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s', }, }, - 'filters': {}, + 'filters': { + }, 'handlers': { 'driver_handler': { 'level': 'DEBUG', @@ -148,6 +141,7 @@ LOGGING = { }} if 'test' in sys.argv: + from driver.pub.config import config config.REG_TO_MSB_WHEN_START = False REST_FRAMEWORK = {} import platform |