mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-10-31 07:57:26 +03:00 
			
		
		
		
	Removed unused Django code
This commit is contained in:
		
							parent
							
								
									86fe19d84c
								
							
						
					
					
						commit
						91be6ac51e
					
				|  | @ -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() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user