Question

I created a django project outside of PyCharm and now I am trying to find out how to add code-completion capabilities to the editor. Where in settings can I add django intellisense?

Was it helpful?

Solution

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:

enter image description here enter image description here

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top