Skip to content

Commit

Permalink
fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
dulmandakh committed Aug 20, 2024
1 parent b8b423a commit c9edbcd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sorl/thumbnail/default.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
from django.utils.functional import LazyObject, SimpleLazyObject
from django.utils.functional import LazyObject

from sorl.thumbnail.conf import settings
from sorl.thumbnail.helpers import get_module_class
from sorl.thumbnail.kvstores.cached_db_kvstore import KVStore


class Backend(LazyObject):
def _setup(self):
self._wrapped = get_module_class(settings.THUMBNAIL_BACKEND)()

class KVStore(LazyObject):
def _setup(self):
self._wrapped = get_module_class("sorl.thumbnail.kvstores.cached_db_kvstore.KVStore")()


class Engine(LazyObject):
def _setup(self):
Expand All @@ -21,6 +24,6 @@ def _setup(self):


backend = Backend()
kvstore = SimpleLazyObject(lambda: KVStore())
kvstore = KVStore()
engine = Engine()
storage = Storage()

0 comments on commit c9edbcd

Please sign in to comment.