如何解决pycharm启动django时报必须定义DJANGO_SETTINGS_MODULE

背景 今天把原先一个在Linux系统运行的django项目搬到Mac下用pycharm启动时报了下面的错误: django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE...

2020-03-16 · 2 分钟 · sharp097