mirror of
https://github.com/pinry/pinry.git
synced 2025-11-13 16:45:41 +01:00
Add a small (125x125px) square thumbnail
This is going to be used by a "similar images" feature #74
This commit is contained in:
@@ -41,6 +41,8 @@ class ImageResource(ModelResource):
|
||||
attribute=lambda bundle: filter_generator_for('standard')(bundle))
|
||||
thumbnail = fields.ToOneField(ThumbnailResource, full=True,
|
||||
attribute=lambda bundle: filter_generator_for('thumbnail')(bundle))
|
||||
square = fields.ToOneField(ThumbnailResource, full=True,
|
||||
attribute=lambda bundle: filter_generator_for('square')(bundle))
|
||||
|
||||
class Meta:
|
||||
fields = ['image', 'width', 'height']
|
||||
|
||||
Reference in New Issue
Block a user