Skip to content

Commit

Permalink
Use {% load humanize %} and |naturaltime
Browse files Browse the repository at this point in the history
  • Loading branch information
davepeck committed Apr 26, 2024
1 parent dc12ad4 commit 93b898e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.humanize",
"django_browser_reload",
"django_htmx",
"server.vb",
Expand Down
3 changes: 2 additions & 1 deletion server/vb/templates/finish_check.dhtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% load humanize %}
<img src="{{ school.logo.url }}"
alt="{{ school.short_name }} {{ school.mascot }} logo" />
<p>
Expand Down Expand Up @@ -46,7 +47,7 @@
<br />
You didn't win a gift card.
{% if most_recent_winner %}
The last winner was {{ most_recent_winner.student.anonymized_name }} {{ most_recent_winner.created_at|timesince }} ago.
The last winner was {{ most_recent_winner.student.anonymized_name }} {{ most_recent_winner.created_at|naturaltime }}.
{% endif %}
Your friends can still win! Share this link: <a href="{% url 'vb:school' slug=school.slug %}">{{ BASE_HOST }}/{{ school.slug }}</a>
{% endif %}
Expand Down

0 comments on commit 93b898e

Please sign in to comment.