mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-17 05:40:25 +00:00
Delay Django import until needed
This commit is contained in:
parent
0575011529
commit
183efabca7
1 changed files with 1 additions and 1 deletions
|
|
@ -1,4 +1,3 @@
|
|||
from django.utils.importlib import import_module
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
|
@ -22,6 +21,7 @@ class ProcessorImporter(object):
|
|||
if name in sys.modules:
|
||||
return sys.modules[name]
|
||||
|
||||
from django.utils.importlib import import_module
|
||||
new_name = self.pattern.sub(r'pilkit.processors\1', name)
|
||||
return import_module(new_name)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue