Commit 261d2a8 1 parent df6f1ec commit 261d2a8 Copy full SHA for 261d2a8
File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,15 @@ def register_filters(app):
63
63
choice_to_list_filter ,
64
64
map_to_tag_class_filter ,
65
65
render_markdown_filter ,
66
+ short_date_filter ,
66
67
slugify_filter ,
67
68
)
68
69
69
70
app .add_template_filter (choice_to_list_filter , "choice_to_list" )
70
71
app .add_template_filter (slugify_filter , "slugify" )
71
72
app .add_template_filter (map_to_tag_class_filter , "map_to_tag_class" )
72
73
app .add_template_filter (render_markdown_filter , "render_markdown" )
74
+ app .add_template_filter (short_date_filter , "short_date" )
73
75
74
76
from digital_land_frontend .filters import commanum_filter
75
77
Original file line number Diff line number Diff line change @@ -59,3 +59,9 @@ def _add_html_attrs(soup):
59
59
tag ["class" ] = "govuk-section-break govuk-section-break--l"
60
60
for tag in soup .select ("code" ):
61
61
tag ["class" ] = "app-code"
62
+
63
+
64
+ def short_date_filter (date ):
65
+ if date is None :
66
+ return ""
67
+ return date .strftime ("%d %B %Y" )
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ <h2 class="govuk-heading-l">Notes</h2>
274
274
{% for note in consideration.notes %}
275
275
{% if not note.deleted_date %}
276
276
< li >
277
- < span class ="govuk-!-font-size-14 "> {{ note.author }} (created: {{ note.created }})</ span >
277
+ < span class ="govuk-!-font-size-14 "> {{ note.author }} (created: {{ note.created | short_date }})</ span >
278
278
< div class ="app-note__content "> {{ note.text|render_markdown }}</ div >
279
279
< div class ="app-note__actions ">
280
280
< span class ="govuk-!-font-size-14 ">
You can’t perform that action at this time.
0 commit comments