Django's |date:"..." template filter does not work with TemplateHTMLRenderer #8129
Unanswered
DanielSwain
asked this question in
Potential Issue
Replies: 1 comment 1 reply
-
It just occurred to me that the date is not actually being treated as a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a viewset that uses TemplateHTMLRenderer as the first
renderer_class
. The form is returned fine when a date is rendered in an unformatted fashion:However, when I include a
|date:"..."
filter afterdate_created
, then nothing is rendered`:All Django built-in template tags work fine (e.g.,
{% if %}
,{% for %}
), but the|date:"..."
filter does not work for any valid date format string. One other odd thing is that if I put in an invalid date filtering string ({{ date_created|date:"xxxxxxxxxxx" }}
), then the invalid formatting string is rendered:Is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions