mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
9856 cleanup
This commit is contained in:
@ -75,11 +75,6 @@ drf-spectacular-sidecar
|
||||
# https://github.com/kurtmckee/feedparser/blob/develop/CHANGELOG.rst
|
||||
feedparser
|
||||
|
||||
# Django wrapper for Graphene (GraphQL support)
|
||||
# https://github.com/graphql-python/graphene-django/releases
|
||||
# Pinned to v3.0.0 for GraphiQL UI issue (see #12762)
|
||||
graphene_django==3.0.0
|
||||
|
||||
# WSGI HTTP server
|
||||
# https://docs.gunicorn.org/en/latest/news.html
|
||||
gunicorn
|
||||
|
@ -1,25 +0,0 @@
|
||||
import graphene
|
||||
from django_filters import filters
|
||||
|
||||
|
||||
def get_graphene_type(filter_cls):
|
||||
"""
|
||||
Return the appropriate Graphene scalar type for a django_filters Filter
|
||||
"""
|
||||
if issubclass(filter_cls, filters.BooleanFilter):
|
||||
field_type = graphene.Boolean
|
||||
elif issubclass(filter_cls, filters.NumberFilter):
|
||||
# TODO: Floats? BigInts?
|
||||
field_type = graphene.Int
|
||||
elif issubclass(filter_cls, filters.DateFilter):
|
||||
field_type = graphene.Date
|
||||
elif issubclass(filter_cls, filters.DateTimeFilter):
|
||||
field_type = graphene.DateTime
|
||||
else:
|
||||
field_type = graphene.String
|
||||
|
||||
# Multi-value filters should be handled as lists
|
||||
if issubclass(filter_cls, filters.MultipleChoiceFilter):
|
||||
return graphene.List(field_type)
|
||||
|
||||
return field_type
|
@ -674,17 +674,6 @@ SPECTACULAR_SETTINGS = {
|
||||
'POSTPROCESSING_HOOKS': [],
|
||||
}
|
||||
|
||||
#
|
||||
# Graphene
|
||||
#
|
||||
|
||||
GRAPHENE = {
|
||||
# Avoids naming collision on models with 'type' field; see
|
||||
# https://github.com/graphql-python/graphene-django/issues/185
|
||||
'DJANGO_CHOICE_FIELD_ENUM_V3_NAMING': True,
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Django RQ (events backend)
|
||||
#
|
||||
|
@ -6,7 +6,7 @@ from django.contrib.auth import get_user_model
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.urls import reverse
|
||||
from django.test import override_settings
|
||||
from graphene.types import Dynamic as GQLDynamic, List as GQLList, Union as GQLUnion, String as GQLString, NonNull as GQLNonNull
|
||||
# from graphene.types import Dynamic as GQLDynamic, List as GQLList, Union as GQLUnion, String as GQLString, NonNull as GQLNonNull
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APIClient
|
||||
|
||||
|
@ -17,7 +17,6 @@ djangorestframework==3.14.0
|
||||
drf-spectacular==0.27.1
|
||||
drf-spectacular-sidecar==2024.2.1
|
||||
feedparser==6.0.11
|
||||
graphene-django==3.0.0
|
||||
gunicorn==21.2.0
|
||||
Jinja2==3.1.3
|
||||
Markdown==3.5.2
|
||||
|
Reference in New Issue
Block a user