📝 Test that `HttpResponseRedirect` works and provide `APIRedirect` exception (#107)
We have a TODO item for redirects:
django-modern-rest/django_modern_rest/controller.py
Line 187 in be877dc
DRF uses regular
HttpResonseRedirect and it seems to work well.We need to test that we also can return
HttpResponseRedirect in @validate endpoints.In
@modify endpoints we should better provide a helper called APIRedirect which should be a subclass of APIError with location field.See the original implementation of
HttpRedirectResponse here https://github.com/django/django/blob/ca3e0484ef31d13053af6a9d50667813e22fc282/django/http/response.py#L628-L653Make sure that
preserve_request also works.@Peopl3s are you interested? This is a nice beginner-friendly task :)
#enhancement #help_wanted #django_modern_rest
sent via relator