Skip to content

Commit

Permalink
Remove graphiql url from debug
Browse files Browse the repository at this point in the history
  • Loading branch information
sudan45 committed Dec 11, 2024
1 parent 3c67260 commit 679ba26
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions main/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
from django.urls import path
from django.views.decorators.csrf import csrf_exempt

from content.views import UserQuery
from main.graphql.schema import CustomAsyncGraphQLView
from main.graphql.schema import schema as graphql_schema

from content.views import UserQuery

urlpatterns = [path("admin/", admin.site.urls), path("chat_message", UserQuery.as_view())]
urlpatterns = [
path("admin/", admin.site.urls),
path("chat_message", UserQuery.as_view()),
path("graphiql/", csrf_exempt(CustomAsyncGraphQLView.as_view(schema=graphql_schema))),
]
if settings.DEBUG:
urlpatterns.append(path("graphiql/", csrf_exempt(CustomAsyncGraphQLView.as_view(schema=graphql_schema))))

# Static and media file URLs
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Expand Down

0 comments on commit 679ba26

Please sign in to comment.