diff --git a/openedx/core/djangoapps/cache_toolbox/app_settings.py b/openedx/core/djangoapps/cache_toolbox/app_settings.py index ad78f383b6..63ece6385c 100644 --- a/openedx/core/djangoapps/cache_toolbox/app_settings.py +++ b/openedx/core/djangoapps/cache_toolbox/app_settings.py @@ -2,6 +2,8 @@ Settings for cache_toolbox. """ +from __future__ import absolute_import + from django.conf import settings # Default cache timeout diff --git a/openedx/core/djangoapps/cache_toolbox/core.py b/openedx/core/djangoapps/cache_toolbox/core.py index f87132134e..b6ee9f86c5 100644 --- a/openedx/core/djangoapps/cache_toolbox/core.py +++ b/openedx/core/djangoapps/cache_toolbox/core.py @@ -8,6 +8,8 @@ Core methods """ +from __future__ import absolute_import + from django.core.cache import cache from django.db import DEFAULT_DB_ALIAS diff --git a/openedx/core/djangoapps/cache_toolbox/middleware.py b/openedx/core/djangoapps/cache_toolbox/middleware.py index e156ef2e7e..6ca177c0df 100644 --- a/openedx/core/djangoapps/cache_toolbox/middleware.py +++ b/openedx/core/djangoapps/cache_toolbox/middleware.py @@ -78,6 +78,8 @@ choice for most environments but you may be happy with the trade-offs of the """ +from __future__ import absolute_import + from logging import getLogger from django.conf import settings diff --git a/openedx/core/djangoapps/cache_toolbox/model.py b/openedx/core/djangoapps/cache_toolbox/model.py index dd7e1973d0..77cbfaaaf7 100644 --- a/openedx/core/djangoapps/cache_toolbox/model.py +++ b/openedx/core/djangoapps/cache_toolbox/model.py @@ -54,6 +54,8 @@ instance:: ... Foo.DoesNotExist """ +from __future__ import absolute_import + from django.db.models.signals import post_delete, post_save from .core import delete_instance, get_instance diff --git a/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py b/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py index 7721227ba8..d791718c42 100644 --- a/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py +++ b/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py @@ -2,6 +2,8 @@ Implementation of custom django template tags for automatically caching template fragments. """ +from __future__ import absolute_import + from django import template from django.core.cache import cache from django.template import Node, TemplateSyntaxError, Variable diff --git a/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py b/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py index 04f77e6204..1c169107c8 100644 --- a/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py +++ b/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py @@ -1,4 +1,6 @@ """Tests for cached authentication middleware.""" +from __future__ import absolute_import + from django.contrib.auth.models import User from django.urls import reverse from django.test import TestCase