Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
channels
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gaoming
channels
Commits
bc23f641
Commit
bc23f641
authored
Jun 05, 2019
by
gaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db_change
parent
709dd610
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
4 deletions
+144
-4
local_settings.py
channels/local_settings.py
+140
-0
settings.py
channels/settings.py
+4
-4
No files found.
channels/local_settings.py
0 → 100644
View file @
bc23f641
"""
Django settings for channels project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import
os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY
=
'b-56^v12@eex@zzf0$v1lopdbu9#@_khe7^3q_-mcz*(!^1n$)'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
False
ALLOWED_HOSTS
=
[
'*'
]
#**********************************Celery Config*************************************************
CELERY_BROKER_URL
=
'redis://127.0.0.1:6379/0'
# Broker配置,使用Redis作为消息中间件
CELERY_RESULT_BACKEND
=
'redis://127.0.0.1:6379/0'
# BACKEND配置,这里使用redis
CELERY_RESULT_SERIALIZER
=
'json'
# 结果序列化方案
#***********************************************************************************
# Application definition
INSTALLED_APPS
=
[
'django.contrib.admin'
,
'django.contrib.auth'
,
'django.contrib.contenttypes'
,
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'like'
,
]
MIDDLEWARE
=
[
'django.middleware.security.SecurityMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'django.middleware.common.CommonMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
'django.middleware.clickjacking.XFrameOptionsMiddleware'
,
]
ROOT_URLCONF
=
'channels.urls'
TEMPLATES
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
[],
'APP_DIRS'
:
True
,
'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
=
'channels.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES
=
{
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
'default'
:
{
'ENGINE'
:
'django.db.backends.mysql'
,
# 设置为mysql数据库
'NAME'
:
'channels'
,
'USER'
:
'root'
,
'PASSWORD'
:
'root_bad_123'
,
'HOST'
:
'localhost'
,
'PORT'
:
''
,
'OPTIONS'
:
{
"init_command"
:
"SET foreign_key_checks = 0;"
,
"charset"
:
"utf8mb4"
,
# 为了支持emoji表情
},
},
}
# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS
=
[
{
'NAME'
:
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.MinimumLengthValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.CommonPasswordValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.NumericPasswordValidator'
,
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
LANGUAGE_CODE
=
'en-us'
TIME_ZONE
=
'Asia/Shanghai'
USE_I18N
=
True
USE_L10N
=
True
USE_TZ
=
True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL
=
'/static/'
channels/settings.py
View file @
bc23f641
...
...
@@ -89,10 +89,10 @@ DATABASES = {
'default'
:
{
'ENGINE'
:
'django.db.backends.mysql'
,
# 设置为mysql数据库
'NAME'
:
'channels'
,
'USER'
:
'
root
'
,
'PASSWORD'
:
'
root_bad_123
'
,
'HOST'
:
'
localhost
'
,
'PORT'
:
''
,
'USER'
:
'
work
'
,
'PASSWORD'
:
'
oars152!traipseize738
'
,
'HOST'
:
'
172.17.40.141
'
,
'PORT'
:
'
3306
'
,
'OPTIONS'
:
{
"init_command"
:
"SET foreign_key_checks = 0;"
,
"charset"
:
"utf8mb4"
,
# 为了支持emoji表情
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment