When include()
ing urlconf from the Django app to the project's urls.py
, some kind of app's name (or namespace) should be specified as:
app_namespace
ininclude((pattern_list, app_namespace), namespace=None)
in mainurls.py
or
app_name
variable in app'surls.py
.
Since, I guess, Django 2, the second method is the preferred one Although I copy-pasted first function signature from Django 3 documentation. But that's not the main point.
My current understanding of namespace
parameter of include()
is that it's what I use when using reverse()
.
What is the purpose of app_name
in app's urls.py
or app_namespace
in main urls.py
?
Are these exactly the same thing?
How is it used by Django?
Existing questions (and answers) I've found here explain HOW I should specify it rather than WHY.