From 91be6ac51e8f16f38ef3ad75ee8961503b6c0cb9 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Tue, 21 Jun 2016 23:42:38 -0700 Subject: [PATCH] Removed unused Django code --- graphene-django/graphene_django/utils.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/graphene-django/graphene_django/utils.py b/graphene-django/graphene_django/utils.py index cf0f5894..a7c37b06 100644 --- a/graphene-django/graphene_django/utils.py +++ b/graphene-django/graphene_django/utils.py @@ -16,16 +16,6 @@ except (ImportError, AttributeError): DJANGO_FILTER_INSTALLED = False -def get_type_for_model(schema, model): - schema = schema - types = schema.types.values() - for _type in types: - type_model = hasattr(_type, '_meta') and getattr( - _type._meta, 'model', None) - if model == type_model: - return _type - - def get_reverse_fields(model): for name, attr in model.__dict__.items(): # Django =>1.9 uses 'rel', django <1.9 uses 'related' @@ -42,15 +32,6 @@ def get_reverse_fields(model): yield related -class WrappedQueryset(LazyList): - - def __len__(self): - # Dont calculate the length using len(queryset), as this will - # evaluate the whole queryset and return it's length. - # Use .count() instead - return self._origin.count() - - def maybe_queryset(value): if isinstance(value, Manager): value = value.get_queryset()