Re: settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-02-12 Thread Adam Johnson
>
> Would Django hard code "text/html" as the default?


Yes, that's exactly what would happen.

Thanks for the bump up, finally added a ticket:
https://code.djangoproject.com/ticket/27829

On 12 February 2017 at 07:28, Brian May 
wrote:

> On Friday, 13 January 2017 19:22:13 UTC+11, Aymeric Augustin wrote:
>>
>> I agree that this setting has become less useful now that 
>> has won.
>>
>> It made more sense when it wasn’t clear whether XHTML1.1 would take over
>> HTML4.
>>
>> I’d be interested to hear about use cases, if someone still uses it and
>> reads this.
>>
>
> Sorry for delay in responding.
>
> If you depreciate `DEFAULT_CONTENT_TYPE` I am not sure what you plan to do
> instead? Would Django hard code "text/html" as the default?
>
> I hadn't realised that the XHTML standards are basically dead (and doesn't
> appear to be supported in HTML5), in which case this probably makes sense.
>
> Thanks
>
> --
> 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/c04be7c1-6ade-469c-b97c-
> 0499598d2084%40googlegroups.com
> 
> .
>
> 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/CAMyDDM2pLcJvZgiAYP1VkhQ2HhBj%2Bow1Om%2B2z2oXcLtCw%3DcJWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-02-12 Thread Brian May
On Friday, 13 January 2017 19:22:13 UTC+11, Aymeric Augustin wrote:
>
> I agree that this setting has become less useful now that  
> has won.
>
> It made more sense when it wasn’t clear whether XHTML1.1 would take over 
> HTML4.
>
> I’d be interested to hear about use cases, if someone still uses it and 
> reads this.
>

Sorry for delay in responding.

If you depreciate `DEFAULT_CONTENT_TYPE` I am not sure what you plan to do 
instead? Would Django hard code "text/html" as the default?

I hadn't realised that the XHTML standards are basically dead (and doesn't 
appear to be supported in HTML5), in which case this probably makes sense.

Thanks 

-- 
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/c04be7c1-6ade-469c-b97c-0499598d2084%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-01-13 Thread Aymeric Augustin
Hello,

I agree that this setting has become less useful now that  has 
won.

It made more sense when it wasn’t clear whether XHTML1.1 would take over HTML4.

I’d be interested to hear about use cases, if someone still uses it and reads 
this.

-- 
Aymeric.


> On 13 Jan 2017, at 04:10, charettes  wrote:
> 
> +1
> 
> Le jeudi 12 janvier 2017 08:11:09 UTC-5, Florian Apolloner a écrit :
> 
> 
> On Thursday, January 12, 2017 at 11:56:49 AM UTC+1, Marc Tamlyn wrote:
> DEFAULT_CONTENT_TYPE does sound like a setting which shouldn't exist.
> 
> +1 
> 
> -- 
> 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/3735cad6-efe2-41bc-9273-98a7437d509a%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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/12577653-9B1C-4394-8685-8E3631529EF3%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


Re: settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-01-12 Thread charettes
+1

Le jeudi 12 janvier 2017 08:11:09 UTC-5, Florian Apolloner a écrit :
>
>
>
> On Thursday, January 12, 2017 at 11:56:49 AM UTC+1, Marc Tamlyn wrote:
>>
>> DEFAULT_CONTENT_TYPE does sound like a setting which shouldn't exist.
>>
>
> +1 
>

-- 
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/3735cad6-efe2-41bc-9273-98a7437d509a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-01-12 Thread Florian Apolloner


On Thursday, January 12, 2017 at 11:56:49 AM UTC+1, Marc Tamlyn wrote:
>
> DEFAULT_CONTENT_TYPE does sound like a setting which shouldn't exist.
>

+1 

-- 
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/756969be-ce14-4bff-a673-4282627e87b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-01-12 Thread Marc Tamlyn
DEFAULT_CONTENT_TYPE does sound like a setting which shouldn't exist.

On 12 January 2017 at 10:53, Adam Johnson  wrote:

> 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
>
> 
>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  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/ms
>> gid/django-developers/7dd3a2df-5cfb-4eec-b949-7147cb5bdf24%
>> 40googlegroups.com
>> 
>> .
>> 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.
>

-- 
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/CAMwjO1E0gsWgExibxSYT5PMSr0Htn%3DW5A5MNVBwkvqmyj0jD0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-01-12 Thread Adam Johnson
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
   

   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  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
> 
> .
> 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.


settings.DEFAULT_CONTENT_TYPE incompatibility with admin

2017-01-10 Thread Tim Graham
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.
For more options, visit https://groups.google.com/d/optout.