Tag Archives: Django path Error

Django path Error: ‘Specifying a namespace in include() without providing an app_name ‘

The specific error prompts are as follows:

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.

This is the error code in using Django:

Solution:

it can be seen from the include() function that this function has two parameters, an Arg and a namespace. I also have two parameters in the code, but the exception prompts that no app is provided_ Name, you also need to pass in a binary tuple, from the sixth line of code urlconf_ module, app_ Name = Arg, you can see that arg is the tuple, and give it to app_ Name is assigned a value, so we modify the code here as follows:

The modified code is as shown above, and the problem is solved

Reflection:

The error is that the include parameter is not set