19 lines
646 B
Python
19 lines
646 B
Python
"""
|
|
URL Configuration for the project.
|
|
"""
|
|
from django.contrib import admin
|
|
from django.urls import path
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
from graphene_django.views import GraphQLView
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
path('graphql/', csrf_exempt(GraphQLView.as_view(graphiql=settings.DEBUG))),
|
|
]
|
|
|
|
# Serve static and media files in development
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |