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, 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 
> application urls. It would come handy in testing and deploying a 
> single-application projects. It may also promote a correct usage of 
> namespaces in application urls, since it would remove the need to construct 
> extra urlconf module for the application tests.
>
> Imagine having the application as defined in my first email. If I want to 
> test it, I can't just use `@override_settings(ROOT_URLCONF='myapp.urls')`, 
> I have to create single line urls.py for the tests, just to have the 
> include which would not ignore the namespace. In my opinion, this commonly 
> leads to just removing the namespace from the application URLs, which makes 
> the problem apparently go away.
>
> The #28413 
> <https://www.google.com/url?q=https%3A%2F%2Fcode.djangoproject.com%2Fticket%2F28413&sa=D&sntz=1&usg=AFQjCNHbscmoZWZ68K0qWMLt7VT-nJJVGw>
>  
> also resulted in somewhat questionable output with no change at all. 
> Apparently that wasn't good call, since this problem keeps recurring.
>
> I suggest to do one of these things:
>  * Take the ROOT_URLCONF namespace into account if it have any.
>  * Document that ROOT_URLCONF can't have namespace AND provide a warning 
> through Django system check framework.
>
> Personally, I'd go for the first option, which I think has negligible 
> impact on the performance and may promote a correct usage of the URL 
> namespaces in third party applications.
>
> Regards
> Vlastimil
>
> Dne čtvrtek 15. února 2018 18:03:44 UTC+1 Tim Graham napsal(a):
>>
>> 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: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 not allow it. That said the 
>>> usefulness seems kinda questionable to me (ie if you enable the admin you 
>>> already have another app for the root urlconf). In that sense I'd say: 
>>> patches welcome and there is nothing obvious speaking against merging them 
>>> as long as they don't introduce performance issues.
>>>
>>> Cheers,
>>> Florian
>>>
>>
> Dne čtvrtek 15. února 2018 18:03:44 UTC+1 Tim Graham napsal(a):
>>
>> 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: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 not allow it. That said the 
>>> usefulness seems kinda questionable to me (ie if you enable the admin you 
>>> already have another app for the root urlconf). In that sense I'd say: 
>>> patches welcome and there is nothing obvious speaking against merging them 
>>> as long as they don't introduce performance issues.
>>>
>>> Cheers,
>>> Florian
>>>
>>
> Dne čtvrtek 15. února 2018 18:03:44 UTC+1 Tim Graham napsal(a):
>>
>> 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: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 not allow it. That said the 
>>> usefulness seems kinda questionable to me (ie if you enable the admin you 
>>> already have another app for the root urlconf). In that sense I'd say: 
>>> patches welcome and there is nothing obvious speaking against merging them 
>>> as long as they don't introduce performance issues.
>>>
>>> Cheers,
>>> Florian
>>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/48ee0d68-3693-4e3d-81ef-83f0060dc741%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to