将端口号修改
端口号
- settings.py同目录下创建
local_settings.py
LANGUAGE_CODE = 'zh-hans'
####### sms ######
# 腾讯云短信应用的app_id
TENCENT_SMS_APP_ID = 1400370984
# 腾讯云短信应用的app_key
TENCENT_SMS_APP_KEY = '65b6ec10baae1fd3b142345c59a18209'
# 腾讯云短信签名内容
TENCENT_SMS_SIGN = 'iDataSharing'
# 上传文件到gridfs
client = settings.MongoDB_client
# client = MongoClient("192.168.92.145", 20000) # 连接MongoDB数据库
from mongeostore_v1 import local_settings
# 设置数据库
mongos_host = local_settings.mongos_host
mongos_port = local_settings.mongos_port
connect(alias='drill_system', db='钻孔数据管理子系统',
host=mongos_host, port=mongos_port)
connect(alias='rs_system', db='遥感数据管理子系统', host=mongos_host, port=mongos_port)
connect(alias='geo_example', db='geo_example',
host=mongos_host, port=mongos_port)
views.pyfrom mongeostore_v1 import settings
client = settings.MongoDB_cluster_client
from mongeostore_v1 import local_settings
# 设置数据库
mongos_host = local_settings.mongos_host
mongos_port = local_settings.mongos_port
connect(alias='default', db='地震数据管理子系统',
host=mongos_host, port=mongos_port)
connect(alias='seismic_system', db='地震数据管理子系统',
host=mongos_host, port=mongos_port) #地震数据
connect(alias='seiAcquisition_system', db='地震数据管理子系统',
host=mongos_host, port=mongos_port) #地震采集数据
connect(alias='seiprocess_system', db='地震数据管理子系统',
host=mongos_host, port=mongos_port) #地震处理数据
connect(alias='seiInterpretation_system', db='地震数据管理子系统',
host=mongos_host, port=mongos_port) #地震解释数据
connect(alias='seihistorical_system', db='地震数据管理子系统',
host=mongos_host, port=mongos_port) #地震历史数据
connect(alias='remote_system', db='遥感数据管理子系统',
host=mongos_host, port=mongos_port)
connect(alias='logging_system', db='测井数据管理子系统',
host=mongos_host, port=mongos_port)
connect(alias='geological_system', db='地质数据管理子系统',
host=mongos_host, port=mongos_port)
connect(alias='hydrological_system', db='水文数据管理子系统',
host=mongos_host, port=mongos_port)
修改说明
- 将端口号都放在了local_settings.py下设置