Yes, I have implemented a subclass to get the functionality I need:
currently I'm wrapping the get method in my subclass to inject the custom
logic of checking for a 202. It works ok. I just was snooping around the
framework code and figured that supporting this functionality would be even
easier i
Sorry - I understood your proposal. I meant - have you already tried the
more circuitous route of creating your own subclass with the Django of
today? Any change to Django can only go out in the next major release, then
you have to upgrade, so it might practically be a year before you can use
it.
Thanks for the reply. Indeed, HTTP 202 isn't a redirect, but quite a few
APIs use it as a "work in progress" indicator with a Location header to
point to the resource to be created. This isn't a standard, just something
I found in the wild a fair few times. One documented instance I stumbled
ac
202 is not a redirect, and I can’t find any standard that says where the
“next” URL can be found. So I don’t think there is a strong argument to
make the test client “follow” it or allow _handle_redirects to support it.
You’re free to subclass the test client in your own project to add support
- ha