You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
django.utils.importlib is a compatibility library for when Python 2.6 was still supported. It has been obsolete since Django 1.7, which dropped support for Python 2.6, and is removed in 1.9 per the deprecation cycle.
Use Python's import_module function instead:
from importlib import import_module
The reason you can import it from django.utils.module_loading is that importlib.import_module is imported in that module, it is not because module_loading in any way defines the actual function.
Since django.utils.module_loading.import_module is not part of the public API, it can be removed at any time if it is no longer used - even in a minor version upgrade.
Django 1.9 No longer supports django.utils.importlib import_module
django-ratelimit/ratelimit/middleware.py
Line 2 in f9b1e16
Source - https://stackoverflow.com/questions/32761566/django-1-9-importerror-for-import-module
The text was updated successfully, but these errors were encountered: