Commit c0e3e670 by Tom Christie

Fix Django compat for Queryset import

parent e05021c8
...@@ -119,7 +119,7 @@ class APIView(View): ...@@ -119,7 +119,7 @@ class APIView(View):
This allows us to discover information about the view when we do URL This allows us to discover information about the view when we do URL
reverse lookups. Used for breadcrumb generation. reverse lookups. Used for breadcrumb generation.
""" """
if isinstance(getattr(cls, 'queryset', None), models.QuerySet): if isinstance(getattr(cls, 'queryset', None), models.query.QuerySet):
def force_evaluation(): def force_evaluation():
raise AssertionError( raise AssertionError(
'Do not evaluate the `.queryset` attribute directly, ' 'Do not evaluate the `.queryset` attribute directly, '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment