#21927: URL namespacing improvements
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by bendavis78):
@mrmachine, `current_app` isn't necessarily available in every template
context. It has to be explicitly set. For example, `contrib.admin` sets
current app as a property on AdminSite, and explicitly adds it to the
context. `contrib.auth` passes around current_app in its view kwargs, and
explicitly sets it when rendering templates.
I don't think "keeping an apps url's from conflicting with each other" is
a reason to fix namespaces, as you can already do that with urlname
prefixes. The reason namespaces need fixing is to improve the API for
deploying multiple instances of the same apps at different urls. It just
so happens it has the added side effect/benefit of allowing devs to avoid
prefixing urlnames.
IMO the API needs to be changed so that **all** urls are put into a
namespace, the default of which is the application's app_label. That would
maket things much easier for app users and app devs alike.
--
Ticket URL: <https://code.djangoproject.com/ticket/21927#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.b87acc1e5a7765556f71a63a7cfd77fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.