diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2015-07-08 10:58:07 +0100 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2015-07-08 11:10:18 +0100 |
| commit | 4e26a84a12c2945331c84d2060162a932fcf4146 (patch) | |
| tree | dddb856f25307a0fe3fb5b7a99157280801a631a | |
| parent | 019eaacefc162dc899195836af0ccd231c288ed8 (diff) | |
[1.6.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
| -rw-r--r-- | docs/releases/1.6.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index 9f90ad4be9..0e13843dd8 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -1133,7 +1133,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) |
