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:05:37 +0100 |
| commit | 5e1fa1400609aae2a021d348c7b5c5bd42ecb3b8 (patch) | |
| tree | 21636a46914794a5cb3f68d88bab54e66666972b /docs | |
| parent | b252e0f35076c0585496b50ad1361ca419059104 (diff) | |
[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
Diffstat (limited to 'docs')
| -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 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) |
