Re: APPEND_SLASH behavior

2021-05-07 Thread chris.j...@gmail.com
On Thursday, May 6, 2021 at 10:32:59 AM UTC-7 f.apo...@gmail.com wrote: > I took a quick glance (literally just that) at the pull requests. I do > like the one that offers a way to abort early inside a prefix -- this is a > nice optimization and as well might open interesting options for > spec

Re: APPEND_SLASH behavior

2021-05-07 Thread Florian Apolloner
On Thursday, May 6, 2021 at 10:19:42 PM UTC+2 Adam Johnson wrote: > That said, I think doing this in process_response would be preferable over >> doing it in process_request so the extra checks when the URL is valid (the >> common case) are reduced. Resolving URLs can take a bit, especially wh

Re: APPEND_SLASH behavior

2021-05-07 Thread Florian Apolloner
Hi Chris, nice hearing from you. On Friday, May 7, 2021 at 6:20:44 PM UTC+2 chris.j...@gmail.com wrote: > With the suggested work-around of having a view call other views, would a > view be able to continue URL resolution in that case? > Not without many code changes I fear and I am not sure

Re: APPEND_SLASH behavior

2021-05-07 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
> > To avoid the problems with the bad interaction with the request machinery, > another approach that came to mind would be to allow inserting / including > a function at any point in the URLconf. The function would return whether > the pattern should be skipped or claimed. That would have the adv