Elaborating on the original proposal to make it backwards compatible, I was thinking along the lines of checking in the middleware whether the response_redirect_class attribute is set with the default class and, if it is, making it use the Model's redirect_type field. For 410 status codes, the response_gone_class would be the attribute to check, of course.
Il giorno sabato 16 ottobre 2021 alle 23:50:26 UTC+2 Niccolò Mineo ha scritto: > I just opened a ticket with the related PR: > https://code.djangoproject.com/ticket/33206 > > Il giorno mercoledì 6 ottobre 2021 alle 23:55:51 UTC+2 Adam Johnson ha > scritto: > >> This seems like a reasonable addition to me. >> >> On Fri, 24 Sept 2021 at 08:08, Niccolò Mineo <niccol...@gmail.com> wrote: >> >>> Hi. The marketing guys at my workplace asked for the ability to >>> customise the redirect type (301, 302) when creating redirects in the >>> admin and I shipped this change a while ago. I believe this could be a nice >>> addition to Django itself, too. What do you think? >>> >>> >>> >>> >>> -- >>> 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/0ccdfe91-c97a-4363-9226-518310ceca04n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/django-developers/0ccdfe91-c97a-4363-9226-518310ceca04n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- 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/55ef8515-6ce5-4d37-b1a1-2306da3f4afan%40googlegroups.com.