1、Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
2、django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
解决办法:
在settings.py中加入下面代码
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HeatEnergy.settings")