#26281: Improve utils.formats.date_format() error message when using time
formatting with datetime.date
--------------------------------------+------------------------------------
Reporter: flesser | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 1.9
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
--------------------------------------+------------------------------------
Comment (by flesser):
I indeed was expecting to use Python's formatting characters in a Python
project.
Using PHP's formatting characters instead (`format="l, d.m.Y"`) as
[https://docs.djangoproject.com/es/1.9/ref/templates/builtins/#date
documented here] gives me the result I was looking for.
Considering the method is intended for use in a Twig-like template
environment, the design decision to make it PHP compatible seems
reasonable. But mentioning that in the docstring and the error message
would help to prevent misunderstandings like mine.
--
Ticket URL: <https://code.djangoproject.com/ticket/26281#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.8ad88250b31efbc5514654c8d33aa84a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.