mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-16 21:30:23 +00:00
Use django-appconf
This commit is contained in:
parent
548fb65618
commit
a196e00059
5 changed files with 11 additions and 6 deletions
5
imagekit/conf.py
Normal file
5
imagekit/conf.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from appconf import AppConf
|
||||
|
||||
|
||||
class ImageKitConf(AppConf):
|
||||
DEFAULT_IMAGE_CACHE_BACKEND = 'imagekit.imagecache.PessimisticImageCacheBackend'
|
||||
|
|
@ -14,7 +14,8 @@ def get_default_image_cache_backend():
|
|||
"""
|
||||
global _default_image_cache_backend
|
||||
if not _default_image_cache_backend:
|
||||
from ..settings import DEFAULT_IMAGE_CACHE_BACKEND as import_path
|
||||
from django.conf import settings
|
||||
import_path = settings.IMAGEKIT_DEFAULT_IMAGE_CACHE_BACKEND
|
||||
try:
|
||||
dot = import_path.rindex('.')
|
||||
except ValueError:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from .. import conf
|
||||
from .fields import ImageSpecField, ProcessedImageField
|
||||
import warnings
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
from django.conf import settings
|
||||
|
||||
DEFAULT_IMAGE_CACHE_BACKEND = getattr(settings,
|
||||
'IMAGEKIT_DEFAULT_IMAGE_CACHE_BACKEND',
|
||||
'imagekit.imagecache.PessimisticImageCacheBackend')
|
||||
3
setup.py
3
setup.py
|
|
@ -28,6 +28,9 @@ setup(
|
|||
packages=find_packages(),
|
||||
zip_safe=False,
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'django-appconf>=0.5',
|
||||
],
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Web Environment',
|
||||
|
|
|
|||
Loading…
Reference in a new issue