response.is_permanent_redirect is unreliable/useless/dangerous for chains of redirects, just give the user the correct URI instead.
example use-case: foo redirects temporarily to bar, which in turn redirects permanently to baz. future requests should still be made to foo, but using is_permanent_redirect would lead to them being made to baz instead.