标签:register debug host mongo mon ODB name 配置 https
import os from mongoengine import * BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) DEBUG = False ALLOWED_HOSTS = [‘*‘] # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases database_name = ‘torstatus‘ MONGO_DATABASE_OPTIONS = { ‘host‘: ‘localhost‘, ‘port‘: 27017, ‘username‘: ‘tor_tester‘, ‘password‘: ‘123456‘, } register_connection(‘default‘, database_name, **MONGO_DATABASE_OPTIONS) DATABASES = { ‘default‘:{ ‘ENGINE‘: ‘‘, ‘NAME‘: ‘‘, } }
标签:register debug host mongo mon ODB name 配置 https
原文地址:https://www.cnblogs.com/zhengze/p/10702293.html