|
@@ -15,7 +15,6 @@ import os
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
-
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
# Quick-start development settings - unsuitable for production
|
|
|
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
|
|
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
|
|
|
|
|
|
|
@@ -27,7 +26,6 @@ DEBUG = True
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
-
|
|
|
|
|
# Application definition
|
|
# Application definition
|
|
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
INSTALLED_APPS = [
|
|
@@ -37,6 +35,8 @@ INSTALLED_APPS = [
|
|
|
'django.contrib.sessions',
|
|
'django.contrib.sessions',
|
|
|
'django.contrib.messages',
|
|
'django.contrib.messages',
|
|
|
'django.contrib.staticfiles',
|
|
'django.contrib.staticfiles',
|
|
|
|
|
+ 'chat',
|
|
|
|
|
+ 'account',
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
MIDDLEWARE = [
|
|
MIDDLEWARE = [
|
|
@@ -54,7 +54,7 @@ ROOT_URLCONF = 'MeChat.urls'
|
|
|
TEMPLATES = [
|
|
TEMPLATES = [
|
|
|
{
|
|
{
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
- 'DIRS': [],
|
|
|
|
|
|
|
+ 'DIRS': [os.path.join(BASE_DIR, 'templates')],
|
|
|
'APP_DIRS': True,
|
|
'APP_DIRS': True,
|
|
|
'OPTIONS': {
|
|
'OPTIONS': {
|
|
|
'context_processors': [
|
|
'context_processors': [
|
|
@@ -69,7 +69,6 @@ TEMPLATES = [
|
|
|
|
|
|
|
|
WSGI_APPLICATION = 'MeChat.wsgi.application'
|
|
WSGI_APPLICATION = 'MeChat.wsgi.application'
|
|
|
|
|
|
|
|
-
|
|
|
|
|
# Database
|
|
# Database
|
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
|
|
|
|
|
|
|
@@ -80,7 +79,6 @@ DATABASES = {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
# Password validation
|
|
# Password validation
|
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
|
|
|
|
|
|
|
@@ -99,13 +97,12 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
|
},
|
|
},
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
-
|
|
|
|
|
# Internationalization
|
|
# Internationalization
|
|
|
# https://docs.djangoproject.com/en/2.0/topics/i18n/
|
|
# https://docs.djangoproject.com/en/2.0/topics/i18n/
|
|
|
|
|
|
|
|
-LANGUAGE_CODE = 'en-us'
|
|
|
|
|
|
|
+LANGUAGE_CODE = 'zh-hans'
|
|
|
|
|
|
|
|
-TIME_ZONE = 'UTC'
|
|
|
|
|
|
|
+TIME_ZONE = 'Asia/Shanghai'
|
|
|
|
|
|
|
|
USE_I18N = True
|
|
USE_I18N = True
|
|
|
|
|
|
|
@@ -113,8 +110,11 @@ USE_L10N = True
|
|
|
|
|
|
|
|
USE_TZ = True
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
-
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
# https://docs.djangoproject.com/en/2.0/howto/static-files/
|
|
# https://docs.djangoproject.com/en/2.0/howto/static-files/
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
STATIC_URL = '/static/'
|
|
|
|
|
+
|
|
|
|
|
+STATICFILES_DIRS = (
|
|
|
|
|
+ os.path.join(BASE_DIR, "static"),
|
|
|
|
|
+)
|