Anonymous avatar Anonymous committed 2cc5468

Renamed config to defaults and modified a couple of default options

Comments (0)

Files changed (4)

 .svn
 *.pyc
 *.db
+*.orig
 .DS_Store

imagekit/config.py

-""" Default ImageKit configuration """
-
-from imagekit.specs import ImageSpec
-from imagekit import processors
-    
-class ResizeThumbnail(processors.Resize):
-    width = 100
-    height = 50
-    crop = True
-    
-class EnhanceSmall(processors.Adjustment):
-    contrast = 1.2
-    sharpness = 1.1
-    
-class SampleReflection(processors.Reflection):
-    size = 0.5
-    background_color = "#000000"
-    
-class DjangoAdminThumbnail(ImageSpec):
-    access_as = 'admin_thumbnail'
-    processors = [ResizeThumbnail, EnhanceSmall, SampleReflection]

imagekit/defaults.py

+""" Default ImageKit configuration """
+
+from imagekit.specs import ImageSpec
+from imagekit import processors
+    
+class ResizeThumbnail(processors.Resize):
+    width = 100
+    height = 50
+    crop = True
+    
+class EnhanceSmall(processors.Adjustment):
+    contrast = 1.2
+    sharpness = 1.1
+    
+class SampleReflection(processors.Reflection):
+    size = 0.5
+    background_color = "#000000"
+    
+class DjangoAdminThumbnail(ImageSpec):
+    access_as = 'admin_thumbnail'
+    processors = [ResizeThumbnail, EnhanceSmall, SampleReflection]

imagekit/options.py

     crop_horz_field = 'crop_horz'
     crop_vert_field = 'crop_vert'
     preprocessor_spec = None
-    cache_dir = 'images'
+    cache_dir = 'cache'
     save_count_as = None
     cache_filename_format = "%(filename)s_%(specname)s.%(extension)s"
     admin_thumbnail_spec = 'admin_thumbnail'
-    spec_module = 'imagekit.config'
+    spec_module = 'imagekit.defaults'
     
     def __init__(self, opts):        
         for key, value in opts.__dict__.iteritems():
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.