Yesterday encountered a problem, pycharm can not run the Django program, see the error is: django.core.exceptions.ImproperlyConfigured:Requested setting CACHES, but Settings is not configured. You must either define the environment variable Django_settings_module or call Settings.configure () before accessing Setti Ngs. As a result, Baidu had no results for half a day, and finally found the answer on the Foreigner's website. The DJANGO project would have been perfectly run in the Python shell, not in Pycharm, because Pycharm wanted you to configure an environment variable Django_settings_module This variable tells the Django project which settings file to look for. Specific steps:
1, run–> Editconfigures
2, find Python a specific name is Python tests (note is not the Django one), and then modify the inside of the environment variables add an item. The name is Django_settings_module value is your SETTINGS, such as mysite.settings.
Turn from: [Http://www.cnblogs.com/lout/articles/4149591.html]
Requested setting CACHES in Pycharm, but settings is not configured. You must either define the environment variable Django_settings_module problem Resolution