summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorCurtis Maloney <curtis@tinbrain.net>2013-08-03 15:41:15 +1000
committerTim Graham <timograham@gmail.com>2013-08-04 07:09:39 -0400
commit07876cf02b6db453ca0397c29c225668872fa96d (patch)
tree2a27c0e5e6ea67e8736547b42e29c9f43af5433e /docs/ref
parentb278f7478d37d3620e5addf7cc2070bc38c10871 (diff)
Deprecated SortedDict (replaced with collections.OrderedDict)
Thanks Loic Bistuer for the review.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/querysets.txt7
-rw-r--r--docs/ref/utils.txt4
2 files changed, 7 insertions, 4 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 95dad202fa..c29ac987a6 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -977,14 +977,13 @@ of the arguments is required, but you should use at least one of them.
``select_params`` parameter. Since ``select_params`` is a sequence and
the ``select`` attribute is a dictionary, some care is required so that
the parameters are matched up correctly with the extra select pieces.
- In this situation, you should use a
- :class:`django.utils.datastructures.SortedDict` for the ``select``
- value, not just a normal Python dictionary.
+ In this situation, you should use a :class:`collections.OrderedDict` for
+ the ``select`` value, not just a normal Python dictionary.
This will work, for example::
Blog.objects.extra(
- select=SortedDict([('a', '%s'), ('b', '%s')]),
+ select=OrderedDict([('a', '%s'), ('b', '%s')]),
select_params=('one', 'two'))
The only thing to be careful about when using select parameters in
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 6b614e0c83..599797bedb 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -105,6 +105,10 @@ to distinguish caches by the ``Accept-language`` header.
.. class:: SortedDict
+.. deprecated:: 1.7
+ ``SortedDict`` is deprecated and will be removed in Django 1.9. Use
+ :class:`collections.OrderedDict` instead.
+
The :class:`django.utils.datastructures.SortedDict` class is a dictionary
that keeps its keys in the order in which they're inserted.