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
Similar Posts:
- Django exception-ImportError: No module named django.core.management
- ImportError: cannot import name ‘patterns’
- The solution of “no matching function for call to…” in G + + compilation
- TypeError: list indices must be integers or slices, not str
- Django @csrf_exempt Cannot work in class view (Django @csrf_exempt not working in class View)
- Django startup error: generator expression must be parentized
- [Solved] Django cannot create an app after creating a project
- [Solved] Pycharm Error: TypeError: init() missing 1 required positional argument: ‘on_delete’
- Python2.7 Error: command not found: django-admin.py [How to Solve]
- Error modulenotfounderror when starting Django: no module named ‘pytz’