Fix Django compat for Queryset import

This commit is contained in:
Tom Christie 2015-07-23 17:43:49 +01:00
parent e05021c8c6
commit c0e3e670ca

View File

@ -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, '