📅  最后修改于: 2022-03-11 14:46:29.691000             🧑  作者: Mango
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)
os.environ['DJANGO_SETTINGS_MODULE'] = 'YOURAPP.settings'
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "YOURAPP.settings")