Django Smarty
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!”
Settings
smarty is a filter composed of several smaller filters:
smartypants is the original SmartyPants
smartycaps wraps capital letters in <span class="initialism"></span>
One can apply any filter individually. For example, if one preferred the original SmartyPants, write {{ post.body|smartypants }}.
One can customize the application and order of smarty filters with the SMARTY_FILTERS setting. By default, the SMARTY_FILTERS setting is:
SMARTY_FILTERS = [
'smartypants',
'smartycaps',
]
One can also customize the HTML class of smartycaps with the SMARTY_CAPS_CLASS setting. By default, the SMARTY_CAPS_CLASS setting is:
SMARTY_CAPS_CLASS = 'initialism'
Metadata
Release files for django-smarty 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-smarty-0.1.3.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_smarty-0.1.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / django-smarty-0.1.3.tar.gz
| Download URL | django-smarty-0.1.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54caad77846c101f9e354b55db7e901e2d56a889d94309ebd794ff66356c9734
|
|
BLAKE2b-256 checksum How to use checksums |
22ef24ad1262e1a4b308e7e5b69e758b9d70a81d9bf5828ad38b6a231413733f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_smarty-0.1.3-py2.py3-none-any.whl
| Download URL | django_smarty-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2664f03a62e3db7a94f6e05f1f2fc49f69b492d5bdd5a7e1c80a6b58a69b6071
|
|
BLAKE2b-256 checksum How to use checksums |
cbe638e898f5aa393e5a5dbccc729bffd3a90de4c0582d7292879b890b4b07df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-smarty 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.