- Author:
- obeattie
- Posted:
- April 17, 2007
- Language:
- Python
- Version:
- .96
- Tags:
- filter typography smartypants
- Score:
- 1 (after 1 ratings)
Really simple filter for using Smartpants in your template -- placed in your custom filters file. Requires python smartypants to be installed.
1 2 3 4 5 6 7 | @register.filter
def smartypants(value):
try:
import smartypants
return smartypants.smartyPants(value)
except:
return value
|
More like this
- Serialize a model instance by chriswedgwood 1 week, 1 day ago
- Automatically setup raw_id_fields ForeignKey & OneToOneField by agusmakmun 9 months, 1 week ago
- Crispy Form by sourabhsinha396 10 months ago
- ReadOnlySelect by mkoistinen 10 months, 2 weeks ago
- Verify events sent to your webhook endpoints by santos22 11 months, 2 weeks ago
Comments
An "except ImportError" would be better form there, assuming that the intent of the bare except is to handle cases where smartypants is not available.
#
Please login first before commenting.