A Django template filter to convert ASCII punctuation into typographic punctuation HTML entities.
Project description
Django Smarty is a Django template filter application to convert ASCII punctuation characters into smart typographic punctuation HTML entities with SmartyPants. Uses the Python smartypants package.
Install
$ pipenv install django-smarty
Add to settings.py.
INSTALLED_APPS = [
# ...
'smarty',
]
Usage
{% load smarty_tags %}
{{ post.body|smarty }}
Result:
“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.1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for django_smarty-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd1fdb4fc321430c6ed7e8ad00338778ed118216c388e8759d9f884ab83a5aae |
|
MD5 | 3204edd3bded62e59b8bab916d659681 |
|
BLAKE2b-256 | be4e577f5146bd731f36bbe7427e0fb6d753829b568cac02350ce4a99c00c59c |