Re: Cross-DB JSONField ready for review

2019-09-12 Thread schinckel
Hi Ole, I'm interested in what you are trying to do with JSONExtract. I have a subclass of Func called JSONBExtractPathText that I use with great success to extract parts of a JSONB object. Also, as of Django 3.0, you can filter directly on an expression (that has an output_field of BooleanFie

cache_control() "max_age" overrides cache_page() "timeout"

2019-09-12 Thread Danny Flack
It is currently impossible to specify a different client-side cache value than a server-side cache value when using both decorators *cache_control* and *cache_page* on a view. For example: @cache_control(max_age=60) > @cache_page(timeout=3600) > def my_view(): > return HttpResponse() This w

Re: PEP 484 type hinting in Django

2019-09-12 Thread Lukas Meier
I'm writing here with the risk of you guys obviously already knowing about it there is a project called monkeytype written by instagram that does analysis similar to what @Maxim said they actually have specific answers to django related questions here https://monkeytype.readthedocs.io/en/stabl

Re: Cross-DB JSONField ready for review

2019-09-12 Thread Ole Laursen
fredag den 2. august 2019 kl. 13.46.46 UTC+2 skrev Sage M.A.: > > As a follow-up to this message > > and this ticket , I have > completed the implementation of a cross-

NULLs taking up space in foreign key indexes

2019-09-12 Thread Ole Laursen
Hi! I recently noticed that the default indexes that Django generates for foreign keys also index NULL values, at least for PostgreSQL. Is this on purpose? >From my digging, it looks like PostgreSQL used to exclude NULL values from the index, but not since some years. It's relatively easy to s

Re: Work in progress (WIP), ticket #28935, Template error raised in an {% extends %} child template shows incorrect source location on debug page

2019-09-12 Thread Carlton Gibson
Hello! Super. 🙂 Can I ask you to put it in a PR on GitHub, so it’s easier to test and review? Thanks. Kind Regards, Carlton > On 12 Sep 2019, at 19:09, Min ho Kim wrote: > > Hi, > I am trying to contribute to code. > > I picked my first issue to solve. > https://code.djangoproject.com/ti

Work in progress (WIP), ticket #28935, Template error raised in an {% extends %} child template shows incorrect source location on debug page

2019-09-12 Thread Min ho Kim
Hi, I am trying to contribute to code. I picked my first issue to solve. https://code.djangoproject.com/ticket/28935 And wanted to solve for the last few weeks, and finally kinda fixed it, but I don't know whether it's good enough. Feels like it's just monkey patched of something. Please have a l

Re: The floatformat filter sometimes returns "-0" rather than "0"

2019-09-12 Thread Adam Johnson
+1 to swapping -0 for 0 On Thu, 12 Sep 2019 at 12:44, Kye Russell wrote: > Sounds reasonable. As you said, the template tags (well, this one) seem to > be to prepare things for human consumption, not to expose computer science > intricacies. > > If I saw this presented on a website, as a ‘develo

Re: The floatformat filter sometimes returns "-0" rather than "0"

2019-09-12 Thread Kye Russell
Sounds reasonable. As you said, the template tags (well, this one) seem to be to prepare things for human consumption, not to expose computer science intricacies. If I saw this presented on a website, as a ‘developer-user’, I’d probably consider it a bug. I’m unsure of other uses of this filter

The floatformat filter sometimes returns "-0" rather than "0"

2019-09-12 Thread Sky Christensen
Hi, I'd like to discuss reopening this wontfix'ed ticket: https://code.djangoproject.com/ticket/30761 The issue is that for values between 0 and -0.5, the floatformat filter returns "-0", whereas I think that most people would expect it to return "0". The ticket was wontfix'ed because "thi