For 410 status codes, the attribute to check would be the response_gone_class, of course.
Il giorno giovedì 21 ottobre 2021 alle 08:43:12 UTC+2 Niccolò Mineo ha scritto: > 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. This could be > extended to the 410, as well. > > What do you think? > > 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/ee059272-00f9-4842-9a08-956cd64dc7fen%40googlegroups.com.