Based on the discussions I've seen, it looks like the problem is not looked at from the correct angle. The request is not to namespace the ROOT_URLCONF, but to respect namespace if a ROOT_URLCONF has one. The use case is to prevent creation of one extra file, just to include the only application urls. It would come handy in testing and deploying a single-application projects. It may also promote a correct usage of namespaces in application urls, since it would remove the need to construct extra urlconf module for the application tests.
Imagine having the application as defined in my first email. If I want to test it, I can't just use `@override_settings(ROOT_URLCONF='myapp.urls')`, I have to create single line urls.py for the tests, just to have the include which would not ignore the namespace. In my opinion, this commonly leads to just removing the namespace from the application URLs, which makes the problem apparently go away.
The #
28413 also resulted in somewhat questionable output with no change at all. Apparently that wasn't good call, since this problem keeps recurring.
I suggest to do one of these things:
* Take the ROOT_URLCONF namespace into account if it have any.
* Document that ROOT_URLCONF can't have namespace AND provide a warning through Django system check framework.
Personally, I'd go for the first option, which I think has negligible impact on the performance and may promote a correct usage of the URL namespaces in third party applications.
Regards
Vlastimil
Dne čtvrtek 15. února 2018 18:03:44 UTC+1 Tim Graham napsal(a):
Dne čtvrtek 15. února 2018 18:03:44 UTC+1 Tim Graham napsal(a):
Dne čtvrtek 15. února 2018 18:03:44 UTC+1 Tim Graham napsal(a):