summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.6.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt
index 1a49cdf2a6..a04984877a 100644
--- a/docs/releases/1.6.txt
+++ b/docs/releases/1.6.txt
@@ -1116,8 +1116,10 @@ you should rename the method and conditionally add an alias with the old name::
If you are writing a library that needs to call the ``get_queryset`` method and
must support old Django versions, you should write::
- method = getattr(some_manager, 'get_queryset', some_manager.get_query_set)
- method(params)
+ get_queryset = (some_manager.get_queryset
+ if hasattr(some_manager, 'get_queryset')
+ else some_manager.get_query_set)
+ return get_queryset() # etc
``shortcut`` view and URLconf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~