def chroma_settings():
"""
Walk back up parent directories until settings.py is found.
Insert that directory as the first entry in sys.path.
Import the settings module, then return it to the caller.
"""
sys.path.insert(0, site_dir())
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
import settings
return settings
评论列表
文章目录