【发布时间】:2015-07-08 01:05:01
【问题描述】:
在我的一项 django 测试中,我使用 django.utils.importlib.import_module 与 here 的使用方式类似。
在升级到 django 1.8 时,我收到了弃用警告
test_views.py:20: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils.importlib import import_module
现在推荐的做法是在标准库中使用来自importlib 的import_module(这似乎工作正常)?还是建议的做法是完全避免使用import_module?
【问题讨论】:
标签: django django-1.8 deprecation-warning