Search code examples
pythondjangointellij-ideapycharm

Error running Django in Intellij / Pycharm


i have problem running Django server in Intellij / Pycharm (I tried in both).

There is that red cross:

enter image description here

And this is the error i get:

Error running Django: Please select Django module

I have Python 2.7.10 and Django (via pip) installed on my computer. I've tried reinstalling both python and Django, but it didn't help. I've specified project sdk (Python).

Edit:

This is what it looks like in "Project Interpreter" page.

enter image description here

and Django configuration:

enter image description here


Solution

  • Try adding DJANGO_SETTINGS_MODULE=untitled.settings to the environment variables listed in the configuration menu by clicking the dropdown titled 'Django' in your first photo.