From 894fe29e15cbe82b7029a2bb119e04d2bfdc7954 Mon Sep 17 00:00:00 2001 From: RobbieHan Date: Tue, 27 Nov 2018 01:05:11 +0800 Subject: [PATCH] change to mysql --- .idea/workspace.xml | 28 +++++++++++----------------- sandboxMP/settings.py | 16 +++++++++++++--- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b517ad2..84711e2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,11 +2,6 @@ - - - - - - @@ -299,18 +294,17 @@ - - + - - + + - + @@ -725,8 +719,8 @@ - - + + diff --git a/sandboxMP/settings.py b/sandboxMP/settings.py index 4c544c2..7810c11 100644 --- a/sandboxMP/settings.py +++ b/sandboxMP/settings.py @@ -81,14 +81,24 @@ WSGI_APPLICATION = 'sandboxMP.wsgi.application' # Database # https://docs.djangoproject.com/en/2.1/ref/settings/#databases +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.sqlite3', +# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), +# } +# } + DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'sandboxMP', + 'HOST': '127.0.0.1', + 'USER': 'ddadmin', + 'PASSWORD': '1234@abcd.com', + 'PORT': '3306' } } - # Password validation # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators