擅长:python、mysql、java
<p><a href="https://docs.djangoproject.com/en/dev/topics/settings/#altering-settings-at-runtime" rel="nofollow">https://docs.djangoproject.com/en/dev/topics/settings/#altering-settings-at-runtime</a>我想这是你想要的。你知道吗</p>
<p>就像上面说的:</p>
<pre><code>from django.conf import settings
settings.DEBUG = True # Don't do this!
</code></pre>
<p><code>The only place you should assign to settings is in a settings file.</code></p>
<p>祝你好运!你知道吗</p>