1 | | I gave a try at the metaclass approach and it works great. Have a look at the added tests. |
| 1 | I gave a try at the metaclass approach and it works great. |
| 2 | |
| 3 | Introduced a `DeprecatedGetQuerySet` type which does the following: |
| 4 | |
| 5 | - Issue a warning on class creation if `get_query_set` is defined. |
| 6 | - Raise an `ImproperlyConfigured` error if both `get_queryset` and `get_query_set` are defined. |
| 7 | - Define a `get_queryset` method if not present. |
| 8 | - Define or wrap the existing `get_query_set` to complain when called. |
| 9 | |
| 10 | The added tests pass on Python 2.7.3/3.2.3 SQLite without raising a warning. |