import os
from django.conf import settings
GALLERIES_DIR = getattr(settings,'CHART_GALLERIES_DIR', os.path.join(settings.STATIC_ROOT, 'chartgallery/galleries'))
# CHART_GALLERIES = getattr(settings,'CHART_GALLERIES', ('financial', 'quickcharts')) # explicit add
MAX_SCALE = getattr(settings, 'CHART_GALLERY_MAX_SCALE', 7)
DEFAULT_MIME = getattr(settings, 'CHART_GALLERY_DEFAULT_MIME', 'png')
DEFAULT_SCALE = getattr(settings, 'CHART_GALLERY_DEFAULT_SCALE', 1)
MIN_SCALE = getattr(settings, 'CHART_GALLERY_MIN_SCALE', 0.25)
MAX_SCALE = getattr(settings, 'CHART_GALLERY_MAX_SCALE', 9)
THUMBNAIL_WIDTH = getattr(settings,'CHART_GALLERIES_THUMBNAIL_WIDTH', getattr(settings,'THUMBNAIL_WIDTH', 240))
THUMBNAIL_HEIGHT = getattr(settings,'CHART_GALLERIES_THUMBNAIL_HEIGHT', getattr(settings,'THUMBNAIL_HEIGHT', 180))
THUMBNAIL_SCALE = getattr(settings,'CHART_GALLERIES_THUMBNAIL_SCALE', .75)
CACHE_ROOT = getattr(settings, 'CHART_GALLERIES_CACHE_ROOT', os.path.join(settings.MEDIA_ROOT, 'chartgallery', 'img', 'cache'))
CACHE_URL = getattr(settings, 'CHART_GALLERIES_CACHE_URL', "%schartgallery/img/cache/" % settings.MEDIA_URL)
VALID_FORMATS = getattr(settings, 'CHART_GALLERY_VALID_FORMATS', (
    'pdf','ps','eps','gif','png','jpg','jpeg','bmp','ppm','tiff','tif','py','pict','pct','tiffp','tiffl','tiff1', 'svg')
    )
