mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
filter
This commit is contained in:
parent
03af6a139a
commit
50b41f8e56
|
@ -168,12 +168,8 @@ def convert_date_to_string(field, registry=None):
|
|||
def convert_onetoone_field_to_djangomodel(field, registry=None):
|
||||
model = field._raw_class
|
||||
manager = field.build_manager(model, 'field')
|
||||
print('field' , field)
|
||||
print('model in convert', model)
|
||||
print('manager definition', manager.definition)
|
||||
def dynamic_type():
|
||||
_type = registry.get_type_for_model(manager.definition['node_class'])
|
||||
print('TYPE = ', _type)
|
||||
if not _type:
|
||||
return
|
||||
|
||||
|
|
|
@ -125,7 +125,6 @@ class DjangoObjectType(ObjectType):
|
|||
if isinstance(root, cls):
|
||||
return True
|
||||
if not is_valid_neomodel_model(type(root)):
|
||||
print(root, info, cls)
|
||||
raise Exception(('Received incompatible instance "{}".').format(root))
|
||||
return root.__class__ == cls._meta.model
|
||||
|
||||
|
|
7
setup.py
7
setup.py
|
@ -12,7 +12,10 @@ with open("graphene_django/__init__.py", "rb") as f:
|
|||
|
||||
rest_framework_require = ["djangorestframework>=3.6.3"]
|
||||
|
||||
neomodel_require = [] #["neomodel>=3.3.0", ]
|
||||
neomodel_require = [
|
||||
"git+git://github.com/MardanovTimur/neomodel.git@arch_neomodel#egg=neomodel",
|
||||
"git+git://github.com/MardanovTimur/django-filter.git@neomodel#egg=django-filter",
|
||||
]
|
||||
|
||||
tests_require = [
|
||||
"pytest>=3.6.3",
|
||||
|
@ -21,8 +24,8 @@ tests_require = [
|
|||
"mock",
|
||||
"pytz",
|
||||
"django-filter<2;python_version<'3'",
|
||||
"django-filter>=2;python_version>='3'",
|
||||
"pytest-django>=3.3.2",
|
||||
*neomodel_require,
|
||||
] + rest_framework_require
|
||||
|
||||
setup(
|
||||
|
|
Loading…
Reference in New Issue
Block a user