Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从我的导入模块的 views.py 文件中导入一个函数。以下代码不起作用:from import.views import myFunction. 怎么做?
from import.views import myFunction
**
** 到目前为止,我能够从导入模块导入其他文件:
sys.path.append(settings.SITE_ROOT+'import') import myFile as test
但它似乎不适用于视图,不知道为什么!