Skip to content

Commit

Permalink
Format date as DD MM YYYY
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed May 2, 2024
1 parent 8d152e5 commit fe6f5b8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions wcivf/apps/elections/templates/elections/election_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
{% block page_title %}{{ object.name }}{% endblock page_title %}
{% block og_title_content %}{{ object.name }}{% endblock og_title_content %}
{% block og_description_content %}
{% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock og_description_content %}
{% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date|date:"j M Y" %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock og_description_content %}
{% block twitter_title_content %}{{ object.name }}{% endblock twitter_title_content %}>
{% block twitter_description_content %}{% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock twitter_description_content %}/>
{% block twitter_description_content %}{% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date|date:"j M Y" %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock twitter_description_content %}/>

{% block content %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{% load i18n %}

{% regroup elections by election_date as elections_by_type %}
{% for election_group in elections_by_type %}
<h3 class="grouper-date">
{{ election_group.grouper }}
{{ election_group.grouper|date:"j F Y" }}
</h3>
</h3>
<div id="election-urls" >
{% for election in election_group.list %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% blocktrans with election_name=object.election.name %}{{ election_name }}: This election has been cancelled. {% endblocktrans %}
{% elif postelection.people|length %}
{% autoescape off %}
{% blocktrans trimmed with election_name=object.election.name num_candidates=postelection.people|length election_date=object.election.election_date %}
{% blocktrans trimmed with election_name=object.election.name num_candidates=postelection.people|length election_date=object.election.election_date|date:"j M Y" %}
See all {{ num_candidates }} candidates in the {{ election_name }} on {{ election_date }}:{% endblocktrans %}
{% for pp in postelection.people %}
{{ pp.person.name|safe }} ({{ pp.party_name }})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2 id='register'>
</p>
{% if postelection %}
<p>
{% blocktrans trimmed with registration_deadline=postelection.registration_deadline election_date=postelection.election.election_date%}
{% blocktrans trimmed with registration_deadline=postelection.registration_deadline election_date=postelection.election.election_date|date:"j M Y" %}
Register before midnight on {{ registration_deadline }} to vote on {{ election_date }}.
{% endblocktrans %}
</p>
Expand Down

0 comments on commit fe6f5b8

Please sign in to comment.