sorl-thumbnail support for a Django Tastypie
Project description
Add a sorl-thumbnail support for a Django Tastypie.
Installation
Install package via pip
pip install django-tastypie-sorl-thumbnail
Usage
from tastypie.authentication import Authentication from tastypie.authorization import Authorization from tastypie.resources import ModelResource from tastypie_sorl_thumbnail.fields import ThumbnailField from .models import Photo class PhotoResource(ModelResource): thumbnail = ThumbnailField('photo', '120', quality=80) class Meta(object): queryset = Photo.objects.all() resource_name = 'photo' authentication = Authentication() authorization = Authorization()
Logging
Configure tastypie-sorl-thumbnail logger.
Testing
$ python setup.py test
or
$ python manage.py test tastypie_sorl_thumbnail
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-tastypie-sorl-thumbnail-0.1.5.tar.gz
.
File metadata
- Download URL: django-tastypie-sorl-thumbnail-0.1.5.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a48f68018b318bf310a8c66a4e060601b3481fbe6769aa33b04903c2da7daeb7 |
|
MD5 | 0d45ba9cfc2277337a99057cbd46ed61 |
|
BLAKE2b-256 | be5cc1be02504762d65b002666d8d4da1a2453515fcd3a02fd36f4ccf3b836bf |
File details
Details for the file django_tastypie_sorl_thumbnail-0.1.5-py2.py3-none-any.whl
.
File metadata
- Download URL: django_tastypie_sorl_thumbnail-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bc2c5eebcea3aebb98ff3ffb6c5a8305c473bed0b876596c71b3d0991bdb4c3 |
|
MD5 | a2992f85272b58fa074d48f0437ce5f6 |
|
BLAKE2b-256 | 4f9c5f6270c0137469c5d10d9dc3d45ea47560c6510d9249fe5a3937681adbac |