[Django] #24932: Add Cast database function

16 views
Skip to first unread message

Django

unread,
Jun 5, 2015, 6:11:01 AM6/5/15
to django-...@googlegroups.com
#24932: Add Cast database function
----------------------------------------------+--------------------
Reporter: Ian-Foote | Owner: nobody
Type: New feature | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
`Cast` can currently be used via `RawSQL`: `RawSQL("cast(%s as datetime)",
(now,))`. It would be good to make this nicer to use.

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

Django

unread,
Jun 5, 2015, 6:18:08 AM6/5/15
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------

Reporter: Ian-Foote | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


Comment:

This would be very nice and explicit casts are used in contrib.postgres in
several places. The postgres syntax is `::text` (or similar).

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

Django

unread,
Jun 5, 2015, 7:39:00 AM6/5/15
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner: Ian-Foote
Type: New feature | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* owner: nobody => Ian-Foote
* status: new => assigned


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

Django

unread,
Aug 1, 2015, 8:58:27 AM8/1/15
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner: Ian-Foote
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

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

* needs_docs: 0 => 1
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/4809 PR] (no docs at this time).

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

Django

unread,
Nov 6, 2015, 8:42:00 AM11/6/15
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner:

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

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

* status: assigned => new
* needs_better_patch: 0 => 1
* owner: Ian-Foote =>


Comment:

PR closed, submitter indicated that they are not going to work on this
ticket anymore, deassigning.

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

Django

unread,
Nov 15, 2015, 9:05:45 AM11/15/15
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner:

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by sir-sigurd):

* cc: fedoseev.sergey@… (added)


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

Django

unread,
Mar 11, 2016, 3:03:16 PM3/11/16
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner:

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0
* needs_docs: 1 => 0


Comment:

[https://github.com/django/django/pull/6271 New PR] based on Ian's patch.

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

Django

unread,
Mar 15, 2016, 1:07:30 PM3/15/16
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner:

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | 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:

(waiting for #25759 to merge before tweaking this a bit)

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

Django

unread,
Mar 28, 2016, 1:57:43 PM3/28/16
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner:

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


Comment:

[https://github.com/django/django/pull/6338 Updated PR] on a branch with
the dependent ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/24932#comment:8>

Django

unread,
Mar 29, 2016, 9:09:23 AM3/29/16
to django-...@googlegroups.com
#24932: Add Cast database function
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner: Tim
| Graham <timograham@…>
Type: New feature | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: | 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: new => closed
* owner: => Tim Graham <timograham@…>
* resolution: => fixed


Comment:

In [changeset:"03b6947728466e4e907487f30dd4dfec94a8eb2f" 03b6947]:
{{{
#!CommitTicketReference repository=""
revision="03b6947728466e4e907487f30dd4dfec94a8eb2f"
Fixed #24932 -- Added Cast database function.

Thanks Ian Foote for the initial patch.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24932#comment:9>

Reply all
Reply to author
Forward
0 new messages