twoscoops / two-scoops-of-django-1.11

The issue tracker, changelog, and code repository for Two Scoops of Django 1.11

Home Page:https://www.twoscoopspress.com/products/two-scoops-of-django-1-11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URL namespace requires setting of app_name

awtimmering opened this issue · comments

Location within the Book

  • 8.4 Section: Use URL Namespaces

Description

Snippet:

urlpatterns += [
    path('tastings/', include('tastings.urls', namespace='tastings')),
]

yields:

django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.

Not sure about the best solution, but details here.

I think this is due to the Django version. In older version of django app_name are not required

Thank you, makes sense.