A weak point (IMHO) in the documentation is, the links to explain what an
`application namespace` is link to:
https://docs.djangoproject.com/en/4.0/topics/http/urls/#term-application-
namespace
Which states:
> This describes the name of the application that is being deployed. Every
instance of a single application will have the same application namespace.
For example, Django’s admin application has the somewhat predictable
application namespace of 'admin'.
So reading this sentance, all I know is that there is this mythical
creature called a `application namespace` lurking in my codebase
somewhere. Does he live in an `apps.py` `AppConfig.name` or
`AppConfig.label`, somewhere else ? Admin has the `application namespace`
of `admin`. How was it defined, where was it defined? How do I get the
`application namesspace` for another app?
To be honest I have learnt much more than what I could deduce from the
name `application namespace`. Maybe I am missing the obvious here. This
issue has tripped me up for years, I just try various strings until it
works.
--
Ticket URL: <https://code.djangoproject.com/ticket/33774>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Michael):
Researching this some more I see I created this forum topic about a year
ago (which has no replies, so maybe its not clear what the answer is):
[Confused by Namespace vs app.name and
app.label](https://forum.djangoproject.com/t/confused-by-namespace-vs-app-
name-and-app-label/8873)
--
Ticket URL: <https://code.djangoproject.com/ticket/33774#comment:1>
* status: new => closed
* resolution: => duplicate
Comment:
See the block further down:
https://docs.djangoproject.com/en/4.0/topics/http/urls/#url-namespaces-
and-included-urlconfs
This shows how both the application namespace, and instance namespace are
specified.
I feel this query is much better targeted at the support channels. (See
TicketClosingReasons/UseSupportChannels.) Following up on that forum
thread would likely be a good approach.
URL namespaces are somewhat unclear/complex. To the extent that this is a
request to clarify that, it's likely a duplicate of #26661, which is
likely to be resolved by a documentation clarification.
--
Ticket URL: <https://code.djangoproject.com/ticket/33774#comment:2>
Comment (by Carlton Gibson):
I followed up on the forum post: https://forum.djangoproject.com/t
/confused-by-namespace-vs-app-name-and-app-label/8873/2
Hopefully that helps
--
Ticket URL: <https://code.djangoproject.com/ticket/33774#comment:3>
Comment (by Michael):
Replying to [comment:2 Carlton Gibson]:
> See the block further down:
https://docs.djangoproject.com/en/4.0/topics/http/urls/#url-namespaces-
and-included-urlconfs
>
> This shows how both the application namespace, and instance namespace
are specified.
>
> I feel this query is much better targeted at the support channels. (See
TicketClosingReasons/UseSupportChannels.) Following up on that forum
thread would likely be a good approach.
>
> URL namespaces are somewhat unclear/complex. To the extent that this is
a request to clarify that, it's likely a duplicate of #26661, which is
likely to be resolved by a documentation clarification.
That was a big help thank you! I now finally understand the `app_name` is
just an unrelated variable to the AppConfig mechanism. If it was something
like `url_namespace` (instead of `app_name`) that might help people
understand that it's a completely separate mechanism. But maybe its just
me getting tripped up by this.
--
Ticket URL: <https://code.djangoproject.com/ticket/33774#comment:4>