Having reviewed the ticket a bit and thought about it, I've had two thoughts:
1. The current patch doesn't fix existing custom views <https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#adding-views-to-admin-sites> which the docs explain how to use, and I've seen used quite often. It's quite likely custom views just return TemplateResponses. 2. We could fix this instead by making the admin 'incompatible' with DEFAULT_CONTENT_TYPE being set to anything other than text/html with a system check to warn against / enforce this. This is possible because admin is a contrib app rather than part of django core. But perhaps the end result is probably similar to deprecating it, since many (most?) projects use the admin. 3. This is actually the first time I heard about DEFAULT_CONTENT_TYPE and I think it's quite surprising that it's a setting and can affect all installed apps like this. After all, if a project is sending a lot of e.g. XML responses, it's possible, and probably clearer, to do similar to this PR and subclass TemplateResponse to set a new default for content_type. On 10 January 2017 at 18:15, Tim Graham <timogra...@gmail.com> wrote: > According to ticket #23908 [0], > > By using the setting: > > > DEFAULT_CONTENT_TYPE = "application/xhtml+xml" > > > The admin site no longer renders correctly. > > > Do you think we should try to fix this by having all the admin responses > specify content_type="text/html"? That requires a lot of changes [1] -- I'm > not sure if discouraging the use of that setting might be acceptable > instead. I imagine any third-party app that provides templates has this > same problem. > > > [0] https://code.djangoproject.com/ticket/23908 > > [1] https://github.com/django/django/pull/7807 > > -- > 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 post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-developers/7dd3a2df-5cfb-4eec-b949- > 7147cb5bdf24%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/7dd3a2df-5cfb-4eec-b949-7147cb5bdf24%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Adam -- 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 post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM1ndB51AYfO-RzTahXgSs%3D4sktXdNs8KDPYV4Q7HsP9-Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.