mirror of
https://github.com/pinry/pinry.git
synced 2025-11-13 16:45:41 +01:00
Removing the dependency of django-thumbs.
This commit is contained in:
@@ -20,8 +20,8 @@ class PinResource(ModelResource): # pylint: disable-msg=R0904
|
||||
}
|
||||
|
||||
def dehydrate_thumbnail(self, bundle):
|
||||
pin = Pin.objects.only('image').get(pk=bundle.data['id'])
|
||||
return pin.image.url_200x1000
|
||||
pin = Pin.objects.only('thumbnail').get(pk=bundle.data['id'])
|
||||
return pin.thumbnail.url
|
||||
|
||||
|
||||
class UserResource(ModelResource):
|
||||
|
||||
Reference in New Issue
Block a user