I am referring https://www.webforefront.com/django/namedjangourls.html to understand django urlconfs. I have encountered terms instance namespace and application namespace. I know about namespaces in urlsconfs. But I don't know the difference between them.
I referred django docs for it. It mentions that instance and app namespaces, comes into picture, when multiple instances of same app is used in django project.
But still, I am not able to understand it. I have googled out, but couldn't find any help on it.
Thanks in advance.
From my understanding, it goes like this:
The application of Instance namespace might sound a bit confusing. Let me try to clarify if that's the case. Consider the example given in the Django docs.
The namespaces are defined like this:
app_nameattribute in polls/urls.pynamespaceargument in urls.pyHere, both
author-pollsandpublisher-pollsare using the samepolls.urlsto resolve their URLs. Without an Instance namespace, resolving a URL like 'polls:index' could create confusion on which URL it's intending to fetch. That's why Django has a set of protocol defined to fix this issue for all kinds of situations when you are attempting to reverse and resolve namespaced URLs.