Skip to content

Commit a40ab87

Browse files
pmaraisowais
authored andcommitted
Update urls.py to avoid namespace error (django-webpack#156)
Updating the simple/app/urls.py to avoid `django.core.exceptions.ImproperlyConfigured` error.
1 parent 710a408 commit a40ab87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/simple/app/urls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
from django.conf.urls import include, url
1717
from django.contrib import admin
1818
from django.views.generic import TemplateView
19-
20-
19+
## For Django 2+ support
20+
from django.urls import path
2121

2222
urlpatterns = [
2323
url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'),
24-
url(r'^admin/', include(admin.site.urls)),
24+
path('admin/', admin.site.urls), ## Django 2+ admin namespace
2525
]

0 commit comments

Comments
 (0)