简体   繁体   中英

Adding Django intellisense to Pycharm?

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:

在此处输入图片说明在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM