[Django] #26903: support date and timestamp containment within postgres range field

4 views
Skip to first unread message

Django

unread,
Jul 16, 2016, 6:01:15 PM7/16/16
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------
Reporter: ar45 | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: 1.9
Severity: Normal | Keywords: rangefield
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------
currently trying to do a lookup

{{{#!python
MyModel.objects.filter(datetime_range__contains=timezone.now())
}}}
results in incorrect SQL.


Pull request at https://github.com/django/django/pull/6885

--
Ticket URL: <https://code.djangoproject.com/ticket/26903>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 17, 2016, 12:36:16 PM7/17/16
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------------------

Reporter: ar45 | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: rangefield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by charettes):

* needs_better_patch: => 0
* version: 1.9 => master
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26903#comment:1>

Django

unread,
Jul 17, 2016, 12:48:49 PM7/17/16
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------------------

Reporter: ar45 | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: rangefield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by charettes):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/26903#comment:2>

Django

unread,
Jul 17, 2016, 1:22:02 PM7/17/16
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------------------

Reporter: ar45 | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: rangefield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by ar45):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26903#comment:3>

Django

unread,
Aug 10, 2016, 3:21:42 PM8/10/16
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------------------

Reporter: ar45 | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: rangefield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


Comment:

Simon suggests adding tests with timezone aware values.

--
Ticket URL: <https://code.djangoproject.com/ticket/26903#comment:4>

Django

unread,
Jan 10, 2017, 1:52:17 PM1/10/17
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------------------
Reporter: Aron Podrigal | Owner: felixxm
Type: Bug | Status: assigned

Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: rangefield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by felixxm):

* owner: (none) => felixxm
* cc: felisiak.mariusz@… (added)
* status: new => assigned


Comment:

[https://github.com/django/django/pull/7822 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26903#comment:5>

Django

unread,
Jan 10, 2017, 1:54:19 PM1/10/17
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------------------
Reporter: Aron Podrigal | Owner: felixxm
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: rangefield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26903#comment:6>

Django

unread,
Feb 7, 2017, 12:46:38 PM2/7/17
to django-...@googlegroups.com
#26903: support date and timestamp containment within postgres range field
----------------------------------+------------------------------------
Reporter: Aron Podrigal | Owner: felixxm
Type: Bug | Status: closed
Component: contrib.postgres | Version: master
Severity: Normal | Resolution: fixed

Keywords: rangefield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"6b048b364ca1e0e56a0d3815bf2be33ac9998355" 6b048b36]:
{{{
#!CommitTicketReference repository=""
revision="6b048b364ca1e0e56a0d3815bf2be33ac9998355"
Fixed #26903 -- Fixed __contains lookup for Date/DateTimeRangeField.

Thanks Mariusz Felisiak and Tim Graham for polishing the patch.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26903#comment:7>

Reply all
Reply to author
Forward
0 new messages