Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomi77/tastypie-sorl-thumbnail
sorl-thumbnail support for Django Tastypie
https://github.com/tomi77/tastypie-sorl-thumbnail
django django-tastypie python sorl-thumbnail
Last synced: about 1 month ago
JSON representation
sorl-thumbnail support for Django Tastypie
- Host: GitHub
- URL: https://github.com/tomi77/tastypie-sorl-thumbnail
- Owner: tomi77
- License: mit
- Created: 2016-02-26T22:40:53.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-22T07:48:03.000Z (over 8 years ago)
- Last Synced: 2024-12-06T23:39:16.073Z (about 1 month ago)
- Topics: django, django-tastypie, python, sorl-thumbnail
- Language: Python
- Homepage: http://tomi77.github.io/tastypie-sorl-thumbnail/html/
- Size: 842 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==============================
django-tastypie-sorl-thumbnail
==============================.. image:: https://travis-ci.org/tomi77/tastypie-sorl-thumbnail.svg?branch=master
:target: https://travis-ci.org/tomi77/tastypie-sorl-thumbnail
.. image:: https://coveralls.io/repos/github/tomi77/tastypie-sorl-thumbnail/badge.svg?branch=master
:target: https://coveralls.io/github/tomi77/tastypie-sorl-thumbnail?branch=master
.. image:: https://codeclimate.com/github/tomi77/tastypie-sorl-thumbnail/badges/gpa.svg
:target: https://codeclimate.com/github/tomi77/tastypie-sorl-thumbnail
:alt: Code ClimateAdd a ``sorl-thumbnail`` support for a Django Tastypie.
Installation
============Install package via ``pip``
::pip install django-tastypie-sorl-thumbnail
Documentation
=============http://tomi77.github.io/tastypie-sorl-thumbnail/html/
Usage
=====::
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
from tastypie.resources import ModelResource
from tastypie_sorl_thumbnail.fields import ThumbnailFieldfrom .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