Changeset 6787
- Timestamp:
- 12/01/07 10:58:52 (1 year ago)
- Files:
-
- django/trunk/django/template/defaultfilters.py (modified) (1 diff)
- django/trunk/docs/serialization.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/template/defaultfilters.py
r6752 r6787 697 697 def pluralize(value, arg=u's'): 698 698 """ 699 Returns a plural suffix if the value is not 1. By default, 's' is used as699 Returns a plural suffix if the value is not 1. By default, 's' is used as 700 700 the suffix: 701 701 django/trunk/docs/serialization.txt
r6645 r6787 136 136 json_serializer.serialize(queryset, ensure_ascii=False, stream=response) 137 137 138 Django ships with a copy of simplejson_ in the source. Be aware,that if139 you're using that for serializing directly thatnot all Django output can be138 The Django source code includes the simplejson_ module. Be aware that if 139 you're serializing using that module directly, not all Django output can be 140 140 passed unmodified to simplejson. In particular, `lazy translation objects`_ 141 141 need a `special encoder`_ written for them. Something like this will work:: … … 152 152 .. _lazy translation objects: ../i18n/#lazy-translation 153 153 .. _special encoder: http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.7/docs/index.html 154 155 Writing custom serializers156 ``````````````````````````157 158 XXX ...
