Re: Allow namespaced reusable app urls as ROOT_URLCONF

2018-02-16 Thread Florian Apolloner
On Friday, February 16, 2018 at 3:08:33 PM UTC+1, Vlastimil Zíma wrote: > > but to respect namespace if a ROOT_URLCONF has one. > I understood it like that; but as I said I didn't see many valid usecases. Your point about testing though is a good one! -- You received this message because you

Re: Allow namespaced reusable app urls as ROOT_URLCONF

2018-02-16 Thread Tim Graham
Feel free to reopen the ticket if you want to provide a patch. On Friday, February 16, 2018 at 9:08:33 AM UTC-5, Vlastimil Zíma wrote: > > Based on the discussions I've seen, it looks like the problem is not > looked at from the correct angle. The request is not to namespace the > ROOT_URLCONF,

Re: Allow namespaced reusable app urls as ROOT_URLCONF

2018-02-16 Thread Vlastimil Zíma
Based on the discussions I've seen, it looks like the problem is not looked at from the correct angle. The request is not to namespace the ROOT_URLCONF, but to respect namespace if a ROOT_URLCONF has one. The use case is to prevent creation of one extra file, just to include the only applicatio

Re: Allow namespaced reusable app urls as ROOT_URLCONF

2018-02-15 Thread Tim Graham
The issue was raised some months ago in https://code.djangoproject.com/ticket/28413 and came to a similar conclusion. The resolution was to document the restriction. On Thursday, February 15, 2018 at 10:57:54 AM UTC-5, Florian Apolloner wrote: > > Hi, > > On Thursday, February 15, 2018 at 2:40:

Re: Allow namespaced reusable app urls as ROOT_URLCONF

2018-02-15 Thread Florian Apolloner
Hi, On Thursday, February 15, 2018 at 2:40:07 PM UTC+1, Vlastimil Zíma wrote: > Is there a reason not to use namespace from root urlconf? Can we change > that, i.e. make root resolver to load the app_name of the root urls? Did I > missed something else? > I don't think there is any reason to n

Allow namespaced reusable app urls as ROOT_URLCONF

2018-02-15 Thread Vlastimil Zíma
Hi, I've tried to understand how to write an urls module for reusable app and I think I have it correctly: # myapp.urls app_name = 'myapp' urlpatterns = [ url(r'^index/$', MyIndexView.as_view(), name='index'), url(r'^form/$', MyFormView.as_view(), name='form'), ... ] In code I use