<commit_before>==============
sorl-thumbnail
==============

The sorl-thumbnail package provides an easy way to generate image
thumbnails.

Requirements
------------

* Python 2.4+ and the Python Imaging Library (PIL_).
* It does not require Django_, but most features are Django specific.
  sorl-thumbnail should be compatible with all versions of Django
  (let us know if not).
* To enable PDF thumbnails you need ImageMagick_
* For Word document thumbnail handling you need ImageMagick_ and wvWare_.

.. _PIL: http://www.pythonware.com/products/pil/
.. _ImageMagick: http://www.imagemagick.org/
.. _wvWare: http://wvware.sourceforge.net/
.. _Django: http://www.djangoproject.com/

Installation
------------

#. Download the source.
#. Put the ``sorl`` directory in your python path (I keep it in site-packages
   directory).
#. Include the thumbnail app in your ``settings.py``.

Like this::
    
    INSTALLED_APPS = (
        ...
        'sorl.thumbnail',
    )


.. _template-tag:

The {% thumbnail %} template tag
================================

The thumbnail tag creates a thumbnail if it doesn't exist or if the source
was modified more recently than the existing thumbnail. The resulting<commit_msg>sections were messed up == bad formatting<commit_after>==============
sorl-thumbnail
==============

The sorl-thumbnail package provides an easy way to generate image
thumbnails.

Requirements
============

* Python 2.4+ and the Python Imaging Library (PIL_).
* It does not require Django_, but most features are Django specific.
  sorl-thumbnail should be compatible with all versions of Django
  (let us know if not).
* To enable PDF thumbnails you need ImageMagick_
* For Word document thumbnail handling you need ImageMagick_ and wvWare_.

.. _PIL: http://www.pythonware.com/products/pil/
.. _ImageMagick: http://www.imagemagick.org/
.. _wvWare: http://wvware.sourceforge.net/
.. _Django: http://www.djangoproject.com/

Installation
============

#. Download the source.
#. Put the ``sorl`` directory in your python path (I keep it in site-packages
   directory).
#. Include the thumbnail app in your ``settings.py``.

Like this::
    
    INSTALLED_APPS = (
        ...
        'sorl.thumbnail',
    )


.. _template-tag:

The {% thumbnail %} template tag
================================

The thumbnail tag creates a thumbnail if it doesn't exist or if the source
was modified more recently than the existing thumbnail. The resulting
{'fraction_non_alphanumeric': 0.15346938775510205, 'fraction_numerical': 0.0016326530612244899, 'mean_word_length': 3.564245810055866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5153410', 'n_tokens_mistral': 741, 'n_tokens_neox': 696, 'n_words': 264}