How to edit several directories as one project in PyCharm?
문제
I created a django project and as it was recommended in django tutorial I 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.
제휴하지 않습니다 StackOverflow