django filter decode
Use decode template filter: Sample Use: {{variable|decode:"iso-8859-1"}}
- encoding
- decode
Use decode template filter: Sample Use: {{variable|decode:"iso-8859-1"}}
A simplejson encoder that knows how to encode django models, and it's little brother that also know how to deals with lazy translations.
Makes it really easy to return JSON from your views: just return a dict. (Also from [django-webapp](http://code.google.com/p/django-webapp/).)
There is a commonly encountered problem with Django and character sets. Windows applications such as Word/Outlook add characters that are not valid ISO-8859-1 and this results in problems saving a Django model to a database with a Latin 1 encoding. These characters should also be converted to avoid any display issues for the end users even if you are using a UTF-8 database encoding. The topic is well covered at [Effbot](http://effbot.org/zone/unicode-gremlins.htm) and contains a list of appropriate conversions for each of hte problem characters. Correcting this for all of your Django models is another issue. Do you handle the re-encoding during the form validation? The save for each model? Create a base class that all your models need to inherit from? The simplest solution I have created leverages [Signals](http://code.djangoproject.com/wiki/Signals) Combining the re-encoding method suggested at Effbot and the pre_save signal gives you the ability to convert all the problem characters right before the save occurs for any model. **kill_gremlins method replaced with Gabor's suggestion**
4 snippets posted so far.