Is PyCharm unable to handle Flask projects with unorthodox layouts?

Suppose you have the following project structure:


There are *two separate Flask apps* in this project, in separate directories, but it is the same project.

You can mark both /proj/foo/template sand /proj/bar/templates as Template directories, and that works well, but if you try to refer to /static in either app, PyCharm doesn't know where to look. One solution is to mark /proj/foo and /proj/bar as Resource Roots, which will let them pick up on the /static directories, but then that breaks Jinja2 support.

Any recommendations on telling PyCharm that I have two directories for static files?



Please sign in to leave a comment.