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 10:58:07 +0100 |
| commit | f87e552d9842ff9591a9c51ebdb5f96e4dd54b00 (patch) | |
| tree | d708b47901b96514908a8eaed1fd3c2d925a4d75 /docs | |
| parent | e5cfa394d79b6ab1b412bd3b30c6a433b415d56b (diff) | |
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/
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 cc2e44f09c..45d4d86c40 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -1122,7 +1122,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) |
