开发者

How to edit several directories as one project in PyCharm?

开发者 https://www.devze.com 2023-01-23 15:01 出处:网络
I created a django project and as it was recommended in django tutorial I开发者_如何学Go placed static files like .js in separate folder as well as template directory.

I created a django project and as it was recommended in django tutorial I开发者_如何学Go placed static files like .js in separate folder as well as template directory.

The result structure is like:

MyProject >
  scripts # place for .py files
  static # .js, .jpg etc
  templates

Now when I open MyProject directory in PyCharm, it wants all imports starting with "scripts". Like from scripts.myapp.mymodule import MyFunc. But it is ugly.

Is it possible to open all 3 directories as one project or tell PyCharm where the sources are?


Go to Settings | Project Structure and mark the 'scripts' directory as a source root.

0

精彩评论

暂无评论...
验证码 换一张
取 消