Personally I don’t think we should prompt the user for anything. If the user 
gives the username and password in the url (user:pass@host) then we can use 
that, otherwise we just throw an error. 

A more complicated solution involving making a request, detecting a 401, 
prompting the user and retrying the request is a bit overkill and potentially a 
(unlikely) breaking change.

Tom

> On 4 Mar 2021, at 17:55, 'Adam Johnson' via Django developers (Contributions 
> to Django itself) <django-developers@googlegroups.com> wrote:
> 
> 
> I also think this is feature creep and if it's a complicated change it's not 
> worth it.
> 
>> On Thu, 4 Mar 2021 at 18:36, Tim Graham <timogra...@gmail.com> wrote:
>> I'd like to see what your code looks like so far. Personally, this is 
>> sounding a lot more complicated than I imagined when I accepted the ticket. 
>> I doubt this is a highly requested feature that couldn't be solved another 
>> way (e.g. downloading the template file without Django), and It's not clear 
>> to me that adding logic to Django is worth it.
>> 
>>> On Thursday, March 4, 2021 at 11:01:41 AM UTC-5 benc...@gmail.com wrote:
>>> Thanks for the fast reply
>>> 
>>> I found these test cases but I am not sure how to extend them with basic 
>>> auth, because I don't know if the LiveServerTestCase is capable of doing 
>>> basic auth. As I see currently there is no testcase checking basic auth 
>>> here and it has to be checked by hand.
>>> 
>>> I am sorry but could you elaborate on this please because I couldn't find 
>>> these functions.
>>> 
>>> "first add view (in admin_scripts/urls.py is fine) to first check for basic 
>>> auth credentials and then pass off to `serve` (as the existing route 
>>> already does). That should give us the reproduce (or we can closed as 
>>> fixed)."
>>> 
>>> Best Regards,
>>>    Bence
>>> 
>>> Carlton Gibson <carlton...@gmail.com> ezt írta (időpont: 2021. márc. 4., 
>>> Cs, 11:15):
>>>> Hi Bence, welcome! 
>>>> 
>>>> There are already a couple of tests in place to check the remove fetching: 
>>>> 
>>>> https://github.com/django/django/blob/05bbff82638731a6abfed2fe0ae06a4d429cb32f/tests/admin_scripts/tests.py#L2047-L2072
>>>> 
>>>> Without changing the command code I'd first add view (in 
>>>> admin_scripts/urls.py is fine) to first check for basic auth credentials 
>>>> and then pass off to `serve` (as the existing route already does). That 
>>>> should give us the reproduce (or we can closed as fixed). 
>>>> 
>>>> Then I think it's easier if you open a PR with your suggested change after 
>>>> that (but more-or-less sounds plausible without looking in depth.) 
>>>> 
>>>> Hopefully that gets you going? 
>>>> 
>>>> Kind Regards,
>>>> 
>>>> Carlton
>>>> 
>>> 
>>>> -- 
>>>> 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.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-developers/66771c44-5b9f-4c29-b92a-91cd3092e016n%40googlegroups.com.
>> 
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/814187f8-dc2b-47e1-b91d-76d0ab78241an%40googlegroups.com.
> 
> 
> -- 
> Adam
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/CAMyDDM31cTcecyx%2BD%3DEP4nFD2qmW1f%3DOFrQfL7D2j-k9d-cT0w%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/076043F9-46D1-4B6A-A6F0-9034F87EBD5D%40tomforb.es.
  • Hel... Bence Gáspár
    • ... Carlton Gibson
      • ... Bence Gáspár
        • ... Tim Graham
          • ... Bence Gáspár
          • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
            • ... Tom Forbes

Reply via email to