开发者

setup_environ in django

开发者 https://www.devze.com 2023-02-28 15:40 出处:网络
I used this syntax to change the setup_environ live settings from python shell import live_settings from django.core.managementimport setup_environ

I used this syntax to change the setup_environ live settings from python shell

import live_settings
from django.core.management  import setup_environ
setup_environ(live_settings)

Is this change temporary or permanent? Will we have to set it back to setup_e开发者_如何学编程nviron(settings) to have the site function normally or by default the site will take settings instead of live_settings


If you're doing it from the shell, the changes will only exist for the duration of that shell instance -- the stuff in settings.py will be used otherwise.

0

精彩评论

暂无评论...
验证码 换一张
取 消