Skip to content
Myr

Fix index example for TaggedJSONSerializer.register()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Made the example use a keyword, rather than a positional argument, as the intent here is to show how to insert a tag with higher precedence. As a positional argument, this would have been passed to ``force`` instead of ``index``.

authored by Nick Pope · committed by Nick Pope · parent fc6a1d9 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:flask/json/tag.py+1 added-1 removed
34 unmodified lines
3536 def to_python(self, value):37 return OrderedDict(value)3839 app.session_interface.serializer.register(TagOrderedDict, 0)39 app.session_interface.serializer.register(TagOrderedDict, index=0)4041:copyright: © 2010 by the Pallets team.42:license: BSD, see LICENSE for more details.43"""
257 unmodified lines