#28076: DurationField does not work with postgres's default format when dumping 
to
JSON.
---------------------------------------------+--------------------------
               Reporter:  Matthew Schinckel  |          Owner:  me
                   Type:  Uncategorized      |         Status:  assigned
              Component:  Forms              |        Version:  1.11
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+--------------------------
 I have noticed that when creating JSON data in postgres (that includes an
 INTERVAL column), and then attempting to use a DurationField to re-inflate
 that data results in a validation error.

 It seems that parse_duration only handles a very limited set of formats
 (ISO8601, and '1 days, 04:00:00'), however, postgres's format is slightly
 different.

     '1 day 04:00:00'

 I think this format could quite easily be handled by that function.

 Any opposition to a patch that does that?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.86cc906e6457a78c60c2d9efeb85c415%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to