In a.py ,I imported django’s settings.py,I Need to Modify settings.DEBUG .
but how to do it in python script?
I did this but nothing changed , settings.DEBUG=False
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
https://docs.djangoproject.com/en/dev/topics/settings/#altering-settings-at-runtime I think this is you want.
Just like it saied:
The only place you should assign to settings is in a settings file.Good luck!