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
“Hello—world!”
*************
|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
“Hello—world!”
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)
Built Distribution
File details
Details for the file django-smarty-0.1.0.tar.gz
.
File metadata
- Download URL: django-smarty-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d9df0eca5e5e8564370094dcc44a63bacb3d15dcc9f7e005991443c8064bf46 |
|
MD5 | d700b38e09c9b2581225b5d8a915267a |
|
BLAKE2b-256 | cb02bc448f3e3287e7c74f0421de5b36cb4db5c59637fb2af56ec539adb10395 |
Provenance
File details
Details for the file django_smarty-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_smarty-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e10b77e53da58d6c4372f3e88cee67759ca9f142091e7feb700bd19eb936620 |
|
MD5 | 4dd225b065567aa8acca9f1274f74ac9 |
|
BLAKE2b-256 | 2c9a61a0473021704f5effa005364ba1a59eba5ab4c28abc17d5add6ee21c105 |