Discuss: Add a new setting for https schema

2017-08-20 Thread wangwenpei
Dear all: I know we have *settings.SECURE_PROXY_SSL_HEADER *to control https header when we use load-balancer. but I found some small cloud platform doesn't support user set it. so, should we add new config option to support this case, something like: *'SCHEMA_FORCE_HTTPS=True'?*

Re: Discuss: Add a new setting for https schema

2017-08-20 Thread Florian Apolloner
I think in those cases a small middleware would be prefered opposed to a new setting (and therefore nothing which needs to be in core). That said: how is the "cloud" telling you if the request is https or not? Cheers, Florian On Sunday, August 20, 2017 at 7:03:08 PM UTC+2, wangwenpei wrote: > >

Re: Optimizing out unused annotations from count queries

2017-08-20 Thread Anssi Kääriäinen
On Sunday, August 20, 2017 at 2:48:23 AM UTC+3, Josh Smeaton wrote: > Thanks for making me elaborate, because I'm probably wrong. I'll step > through what my thinking was though. > > '.annotate(local=F('related__field'))' will join to the related table. If > `related` is a nullable foreign key,