INCR-116: Run python-modernize on openedx/core/djangoapps/cache_toolbox (#20504)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
Settings for cache_toolbox.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
# Default cache timeout
|
||||
|
||||
@@ -8,6 +8,8 @@ Core methods
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.db import DEFAULT_DB_ALIAS
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user