feature request: add iso_week_day to querysets, analogous to iso_year

2019-09-25 Thread Anatol Ulrich
Hello!
As the subject states I'd like to see iso_week_day in the queryset API (in 
fact, I have already implemented it in my local django fork...), for 
consistency reasons (iso_year already exists), and because the way week_day 
works is quite peculiar and unintuitive.

Cheers
Anatol

-- 
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/3ac26305-1411-4547-b22d-753d5ce6cec0%40googlegroups.com.


Re: feature request: add iso_week_day to querysets, analogous to iso_year

2019-09-25 Thread Adam Johnson
I found the ticket for iso_year, it also mentioned weeks but didn't end up
implementing it: https://code.djangoproject.com/ticket/28649 I'm not quite
sure why.

You probably know more than me. Please open a nwe ticket and create a PR
("patch") for it with your code - instructions for all those on
https://docs.djangoproject.com/en/dev/internals/contributing/ :)

Thank you very much,

Adam

On Wed, 25 Sep 2019 at 12:59, Anatol Ulrich  wrote:

> Hello!
> As the subject states I'd like to see iso_week_day in the queryset API (in
> fact, I have already implemented it in my local django fork...), for
> consistency reasons (iso_year already exists), and because the way week_day
> works is quite peculiar and unintuitive.
>
> Cheers
> Anatol
>
> --
> 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/3ac26305-1411-4547-b22d-753d5ce6cec0%40googlegroups.com
> 
> .
>


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM0oVjLWEnXt9Rs0n5kNw%2BP%2BoT_Qhe5kNrSn-buGAtYygQ%40mail.gmail.com.


Re: feature request: add iso_week_day to querysets, analogous to iso_year

2019-09-25 Thread Mariusz Felisiak
In this ticket we mentioned *iso_week* not *iso_week_day*. *week *lookup 
returns the week number (1-52 or 53) according
to ISO-8601 (https://en.wikipedia.org/wiki/ISO-8601), that's why *iso_week *is 
not necessary. 

-- 
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/696d7546-55c0-4e6a-a81a-d0b75aa347ee%40googlegroups.com.


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

2019-09-25 Thread Sky Christensen
It seems that so far two people have replied in favour of re-opening 
this ticket (or maybe make that three people if you count me), and none 
have replied against re-opening it.


It's been two weeks since the last reply.

What's the next step now?


On 2019-09-12 21:52, Adam Johnson wrote:

+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 ‘developer-user’,
I’d probably consider it a bug. I’m unsure of other uses of this
filter though.

Kye Russell
Sent from my iPhone


On 12 Sep 2019, at 12:54 pm, Sky Christensen

 wrote:


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 "this behavior is consistent

with builtin round() and -0 exists in floating-point arithmetic".


Can I propose that in this case the better way to decide the

result that it should produce is to ask what an ordinary person
would expect to see, rather than what's consistent with a particular
Python function?


When humans round -0.3 to the nearest whole number, we express the

result as 0, not -0. Given that the point of template tags and
filters is to make data more human-readable, I think returning "0"
is preferable in this case than returning "-0".


If this ticket is reopened, I'll be happy to submit a patch for

it.


Cheers,

Sky

--
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/aec9450abcb511a0bb4a020c770a0483%40skychristensen.com.


--
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/1F8DEBF9-FBEB-4A1C-BE3B-CA9D4507E702%40kye.id.au.

--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/CAMyDDM3FhTEUmWmpHaAqHuRxCbqHJcH6riS9vQ%2BNjhx3LcGhPA%40mail.gmail.com
[1].


Links:
--
[1]
https://groups.google.com/d/msgid/django-developers/CAMyDDM3FhTEUmWmpHaAqHuRxCbqHJcH6riS9vQ%2BNjhx3LcGhPA%40mail.gmail.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/f11994750333b35688ad5f8053e1f13f%40skychristensen.com.