import os import sys ROOT = ‘settings.py所在目录‘ sys.path.append(ROOT) from django.core.management import setup_environ import settings setup_environ(settings)
python加载django环境
时间: 2024-11-02 22:54:32
import os import sys ROOT = ‘settings.py所在目录‘ sys.path.append(ROOT) from django.core.management import setup_environ import settings setup_environ(settings)
python加载django环境