Skip to main content

A Django template filter to convert ASCII punctuation into typographic punctuation HTML entities.

Project description

Django Smarty
*************

|PyPI version|_ |Build status|_

.. |PyPI version| image::
https://badge.fury.io/py/django-smarty.svg
.. _PyPI version: https://pypi.python.org/pypi/django-smarty

**Django Smarty** is a `Django <https://www.djangoproject.com/>`_ `template filter <https://docs.djangoproject.com/en/2.0/howto/custom-template-tags/>`_ application to convert ASCII punctuation characters into smart typographic punctuation HTML entities with `SmartyPants <https://daringfireball.net/projects/smartypants/>`_. Uses the `Python smartypants <https://pypi.python.org/pypi/smartypants>`_ package.

* `Package distribution <https://pypi.python.org/pypi/django-smarty>`_
* `Code repository <https://github.com/richardcornish/django-smarty>`_

Install
=======

.. code-block:: bash

$ pipenv install django-smarty

Add to ``settings.py``.

.. code-block:: python

INSTALLED_APPS = [
# ...
'smarty',
]

Usage
=====

.. code-block:: django

{% load smarty_tags %}

{{ post.body|smarty }}

Result:

.. code-block:: html

&#8220;Hello&#8212;world!&#8221;


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

django-smarty-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

django_smarty-0.1.0-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-smarty-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-smarty-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d9df0eca5e5e8564370094dcc44a63bacb3d15dcc9f7e005991443c8064bf46
MD5 d700b38e09c9b2581225b5d8a915267a
BLAKE2b-256 cb02bc448f3e3287e7c74f0421de5b36cb4db5c59637fb2af56ec539adb10395

See more details on using hashes here.

Provenance

File details

Details for the file django_smarty-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_smarty-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8e10b77e53da58d6c4372f3e88cee67759ca9f142091e7feb700bd19eb936620
MD5 4dd225b065567aa8acca9f1274f74ac9
BLAKE2b-256 2c9a61a0473021704f5effa005364ba1a59eba5ab4c28abc17d5add6ee21c105

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page