문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top