From 5e1fa1400609aae2a021d348c7b5c5bd42ecb3b8 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Wed, 8 Jul 2015 10:58:07 +0100 Subject: [PATCH] [1.8.x] Corrected example code for get_query_set upgrade in 1.6 release notes The conditional setting of `get_query_set` is required for correct behaviour if running Django 1.8. The full gory details are here: http://lukeplant.me.uk/blog/posts/handling-django%27s-get_query_set-rename-is-hard/ Backport of f87e552d9842ff9591a9c51ebdb5f96e4dd54b00 from master --- docs/releases/1.6.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index c2b27d86cc..58774ee257 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -1124,7 +1124,8 @@ a ``get_queryset_compat`` method as below and use it internally to your manager: def get_queryset(self): return YourCustomQuerySet() # for example - get_query_set = get_queryset + if django.VERSION < (1, 6): + get_query_set = get_queryset def active(self): # for example return self.get_queryset_compat().filter(active=True)