From f9ccd8a6f823dbbbb4fdf9f11cd1204f309c2976 Mon Sep 17 00:00:00 2001 From: Philip Marais Date: Mon, 2 Apr 2018 12:50:30 +0200 Subject: [PATCH] Update urls.py to avoid namespace error Updating the simple/app/urls.py to avoid `django.core.exceptions.ImproperlyConfigured` error. --- examples/simple/app/urls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/simple/app/urls.py b/examples/simple/app/urls.py index b1ad5f06..09082233 100644 --- a/examples/simple/app/urls.py +++ b/examples/simple/app/urls.py @@ -16,10 +16,10 @@ from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView - - +## For Django 2+ support +from django.urls import path urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'), - url(r'^admin/', include(admin.site.urls)), + path('admin/', admin.site.urls), ## Django 2+ admin namespace ]