Remove dependency on mysql
authorBin Yang <bin.yang@windriver.com>
Fri, 24 Feb 2017 08:33:14 +0000 (16:33 +0800)
committerBin Yang <bin.yang@windriver.com>
Fri, 24 Feb 2017 08:33:14 +0000 (16:33 +0800)
Change-Id: I9bbecf8e22b1ee59ab8d80d808c4e8f0bd1a7421
Issue-Id: MULTIVIM-48
Signed-off-by: Bin Yang <bin.yang@windriver.com>
kilo/kilo/settings.py
kilo/requirements.txt
newton/newton/settings.py
newton/requirements.txt

index c6ad62b..5a7ca29 100644 (file)
 import os
 import sys
 
-import redisco
-
-from kilo.pub.config.config import REDIS_HOST, REDIS_PORT, REDIS_PASSWD
-from kilo.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__)))
 
@@ -73,18 +68,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'
 
 # Static files (CSS, JavaScript, Images)
index 2590479..6d58957 100644 (file)
@@ -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
 
index 8a5cc01..b0be17e 100644 (file)
 import os
 import sys
 
-import redisco
-
-from newton.pub.config.config import REDIS_HOST, REDIS_PORT, REDIS_PASSWD
-from newton.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__)))
 
@@ -73,18 +68,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'
 
 # Static files (CSS, JavaScript, Images)
index 2590479..6d58957 100644 (file)
@@ -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