Commits

George Notaras  committed 21b303f

Updated usage documentation

  • Participants
  • Parent commits cb7a537

Comments (0)

Files changed (1)

File docs/usage.rst

 .. autoclass:: thumbnail_works.fields.EnhancedImageField
 
 
+Accessing thumbnails
+====================
 
-Example
--------
+.. automethod:: thumbnail_works.fields.EnhancedImageFieldFile.__init__
 
-The following code snippet illustrates how to use the ``EnhancedImageField``::
 
-    from thumbnail_works.fields import EnhancedImageField
-    
-    class MyModel(models.Model):
-        photo = EnhancedImageField(
-            process_source = dict(
-                size='512x384', sharpen=True, upscale=True, format='JPEG'),
-            thumbnails = {
-                'small': dict(size='80x60'),
-                'medium': dict(size='256x192', detail=True),
-            }
-        )
+Thumbnail specification objects
+===============================
 
+.. autoclass:: thumbnail_works.fields.ThumbnailSpec
 
-Accessing the thumbnails
-------------------------
-Thumbnails can be accessed as attributes of the ``EnhancedImageField`` instance.
-For example::
-
-    photo = EnhancedImageField(
-        thumbnails = {
-            'small': dict(size='80x60'),
-            'medium': dict(size='256x192'),
-        }
-    )
-
-The thumbnail objects can be accessed