Metadata-Version: 2.0
Name: django-tastypie-sorl-thumbnail
Version: 0.1.4
Summary: sorl-thumbnail support for a Django Tastypie
Home-page: https://github.com/tomi77/tastypie-sorl-thumbnail
Author: Tomasz Jakub Rup
Author-email: tomasz.rup@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Dist: django-tastypie
Requires-Dist: sorl-thumbnail

==============================
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 Climate

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


