#25060: Add support for str(timedelta) representation in parse_duration
-----------------------------+--------------------------------------
Reporter: vmspike | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------+--------------------------------------
Comment (by vmspike):
My specific use case is DurationField in [http://djangonauts.github.io
/django-hstore/ django-hstore] schema mode (but I suppose it can be useful
in other situations).
Without this patch `to_python()` raise an error about inappropriate
format. I agree that in my use case it's preferable to use
`duration_string()` instead of `str()` for conversion, but I still didn't
find the place where I can override this behavior on django-hstore side
:).
Seems now I understand why you don't implement it: str(timedelta) output
can be different depends on locale? If so this patch is controversial
point.
--
Ticket URL: <https://code.djangoproject.com/ticket/25060#comment:3>
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/065.69e874ae23676b6aa7e2a14238566b12%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.