From fbe56036c500becf6587da1d6fad9021d87c6b9d Mon Sep 17 00:00:00 2001 From: Muhammed Aldulaimi Date: Fri, 8 Nov 2024 07:39:50 +0300 Subject: [PATCH] Fix error: deprecated in --- examples/cookbook/cookbook/urls.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/cookbook/cookbook/urls.py b/examples/cookbook/cookbook/urls.py index e72b383d..e61bb4af 100644 --- a/examples/cookbook/cookbook/urls.py +++ b/examples/cookbook/cookbook/urls.py @@ -1,9 +1,10 @@ -from django.conf.urls import url +# from django.conf.urls import url # Deprecated in Django 3.0, see https://stackoverflow.com/a/70319607 from django.contrib import admin +from django.urls import re_path from graphene_django.views import GraphQLView urlpatterns = [ - url(r"^admin/", admin.site.urls), - url(r"^graphql$", GraphQLView.as_view(graphiql=True)), + re_path(r"^admin/", admin.site.urls), + re_path(r"^graphql$", GraphQLView.as_view(graphiql=True)), ]