2
I think I fixed this by adding the DJANGO_SETTINGS_MODULE
environment variable to the default run configurations.
Try adding this variable, and setting the value to <projectname>.settings
, and run one of your project files:
PS: You can also add this environment variable to the console environment under:
File -> Settings -> Console -> Python Console -> Environment Variables
This will make it possible to use the integrated PyCharm console to access your project, which is way better than using the console that ships with Django.
Source:stackexchange.com