问题
Is it incorrect to use:
from [app name] import views
when you're inside that app?
I'm following the tutorial from the Django documentation website; and everything is working; however, I'm getting a syntax error (it still works though) every time I do the following:

*I'm using PyCharm
回答1:
If you right click the mysite.com/mysite folder and select Mark Directory As -> Source Root you should be able to do from polls import views
来源:https://stackoverflow.com/questions/17012558/django-tutorial-importing-views-from-polls-app-syntax-error-pycharm