How to edit several directories as one project in PyCharm?
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.
精彩评论