The current approach can lead to surprising errors if include() is called 
by a helper function, rather than directly called in your urlconf. The 
relative import would be resolved in relation to the module where the 
helper function is defined. I'm not sure how much of an actual problem that 
is in practice, but it's something to keep in mind. 

On Monday, February 29, 2016 at 2:20:23 PM UTC+1, Aymeric Augustin wrote:
>
> I’m +0 on this change, for consistency with Python’s import statement.
>
> -- 
> Aymeric.
>
> On 29 Feb 2016, at 14:17, Tim Graham <timog...@gmail.com <javascript:>> 
> wrote:
>
>
> 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.
>
> ----
>
> What do you think of this proposal from 
> https://code.djangoproject.com/ticket/26288? I don't know if "nested 
> apps" are very common and/or something that should be promoted with a 
> change like this.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-develop...@googlegroups.com <javascript:>.
> To post to this group, send email to django-d...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/5a92150c-4969-4432-b47b-0a02ce889312%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-developers/5a92150c-4969-4432-b47b-0a02ce889312%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/187d6ad9-289d-446a-9932-a2c57ef3912c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to