mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
Merge 60b681d70d
into afec960e4d
This commit is contained in:
commit
e1c465e9ab
|
@ -38,6 +38,9 @@ INSTALLED_APPS = [
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'graphene_django',
|
||||
|
||||
# a GUI for graphQL
|
||||
'django_graphiql',
|
||||
|
||||
'cookbook.ingredients.apps.IngredientsConfig',
|
||||
'cookbook.recipes.apps.RecipesConfig',
|
||||
|
@ -56,6 +59,7 @@ MIDDLEWARE_CLASSES = [
|
|||
|
||||
GRAPHENE = {
|
||||
'SCHEMA': 'cookbook.schema.schema',
|
||||
'SCHEMA_INDENT': 2,
|
||||
'MIDDLEWARE': (
|
||||
'graphene_django.debug.DjangoDebugMiddleware',
|
||||
)
|
||||
|
@ -130,8 +134,3 @@ USE_TZ = True
|
|||
# https://docs.djangoproject.com/en/1.9/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
GRAPHENE = {
|
||||
'SCHEMA': 'cookbook.schema.schema',
|
||||
'SCHEMA_INDENT': 2,
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
from django.conf.urls import url
|
||||
from django.conf.urls import include
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.contrib import admin
|
||||
|
||||
from graphene_django.views import GraphQLView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^graphql', GraphQLView.as_view(graphiql=True)),
|
||||
url(r'^graphql', csrf_exempt(GraphQLView.as_view(graphiql=True))),
|
||||
url(r'^graphiql', include('django_graphiql.urls')),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user