From 2fbc2b268c8ef2c7329fb613ce1599084e2c91bb Mon Sep 17 00:00:00 2001 From: branw Date: Fri, 24 Feb 2017 16:48:48 +0800 Subject: Remove dependency on mysql Change-Id: I605e43506107e7e04566a63f135d50cabd244880 Issue-Id: MULTIVIM-48 Signed-off-by: branw --- vio/requirements.txt | 3 --- vio/vio/settings.py | 14 ++------------ 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/vio/requirements.txt b/vio/requirements.txt index 97f6b0b..fba25ad 100644 --- a/vio/requirements.txt +++ b/vio/requirements.txt @@ -2,9 +2,6 @@ Django==1.9.6 djangorestframework==3.3.3 -# for access MySQL -MySQL-python==1.2.5 - # redis cache redis==2.10.5 diff --git a/vio/vio/settings.py b/vio/vio/settings.py index ba8c5a1..9a95094 100644 --- a/vio/vio/settings.py +++ b/vio/vio/settings.py @@ -13,10 +13,6 @@ import os import sys -import redisco - -from vio.pub.config.config import REDIS_HOST, REDIS_PORT, REDIS_PASSWD -from vio.pub.config.config import DB_NAME, DB_IP, DB_USER, DB_PASSWD, DB_PORT # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -74,17 +70,11 @@ REST_FRAMEWORK = { DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': DB_NAME, - 'HOST': DB_IP, - 'PORT': DB_PORT, - 'USER': DB_USER, - 'PASSWORD': DB_PASSWD, + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), }, } -redisco.connection_setup(host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWD, db=0) -# CACHE_BACKEND = 'redis_cache.cache://%s@%s:%s' % (REDIS_PASSWD, REDIS_HOST, REDIS_PORT) TIME_ZONE = 'UTC' -- cgit 1.2.3-korg