#26288: Support relative imports in django.conf.urls.include
-----------------------------+--------------------
Reporter: lamby | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: 1.9
Severity: Normal | Keywords: urls
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
For example, within `myproject.urls`:
{{{
urlpatterns = (
url(r'', include('.myapp.urls')),
)
}}}
.. becomes equivalent to::
{{{
urlpatterns = (
url(r'', include('myproject.myapp.urls')),
)
}}}
Whilst a contrived example, this can make heavy-nested apps look far, far
cleaner. For example, within `myproject.foo.foo_bar.foo_bar_baz.urls`, one
only needs to include `.foo_bar_baz_qux.urls` to get to the "next"
level, rather than the significantly more unwieldy
`myproject.foo.foo_bar.foo_bar_baz.foo.bar_baz_qux.urls`.
--
Ticket URL: <https://code.djangoproject.com/ticket/26288>
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/048.6926076e682d806996a2c15f3dbccf49%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.