Edit settings.py to host a appropreate django
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = ''
DEBUG = True
# Allowed any host to interact with this django service
# DEFAULT : ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']
# This tells django other applications which needs to install.
INSTALLED_APPS = [
...
'System',
'opensource_01',
'opensource_02',
...
'opensource_XX',
]
MIDDLEWARE = [ ... ]
ROOT_URLCONF = 'Opensource.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
'DIRS': [
os.path.join(BASE_DIR),
],
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'Opensource.wsgi.application'
DATABASES = {
'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.mysql',
# if you want to use mongodb
# First install 'django-norel' by using pip.
# Second install 'django tooblox' also by pip.
# Third install 'mongodb-engine' still by pip.
# At last, use 'django_mongodb_engine' in 'ENGINE' like bottom as your backend.
# 'ENGINE': 'django_mongodb_engine',
'NAME': 'DB_NAME',
'USER': 'DB_USER',
'PASSWORD': 'DB_PASSWD',
'HOST': 'DB_LOCATION',
'PORT': 'DB_PORT',
}
}
AUTH_PASSWORD_VALIDATORS = [ ... ]
# DEFAULT: LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'zh-hant'
# DEFAULT: TIME_ZONE = 'UTC'
TIME_ZONE = 'Asia/Taipei'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'