Confused by Namespace vs app.name and app.label

The key to namespaces is that they only apply to URL patterns when used with include().

The docs have three ways include() can be called.

include(module, namespace=None)¶
include(pattern_list)
include((pattern_list, app_namespace), namespace=None)

Usually you use the first way, just as include(module), and don’t pass a namespace at all.
The application namespace is pulled from the includes urls.py — this is the example in the docs here

The key bit to recall is that the namespace kwarg is for the instance namespace — which is how you include the same set of URL patterns multiple time.

But normally you don’t need that.

The third example — include((pattern_list, app_namespace), namespace=None) is how you pass the application namespace manually, in a tuple. Again often you’d do this without the namespace, since you don’t often include the same urls twice….

It’s a little bit gnarly to say the least, but keeping in mind the three calling patterns from the include() reference (same link as at the top here) is the way to keeping it clear.

I hope that helps.