Skip to content

Commit

Permalink
[req-changes] Updated formatting of the date
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Feb 14, 2024
1 parent fec2c76 commit 51e0292
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% load i18n %}
{% load l10n %}

<p>{% blocktrans with expiry_date=expiry_date|date:"Y-m-d" %}We inform you that the password for your account {{ username }} will expire in 7 days, precisely on {{ expiry_date }}.{% endblocktrans %}<p>
<p>{% blocktrans with expiry_date=expiry_date|localize %}We inform you that the password for your account {{ username }} will expire in 7 days, precisely on {{ expiry_date }}.{% endblocktrans %}<p>

<p>{% trans "Kindly proceed with updating your password by clicking on the button below." %}<p>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% load i18n %}
{% load l10n %}

{% blocktrans with expiry_date=expiry_date|date:"Y-m-d" %}We inform you that the password for your account {{ username }} will expire in 7 days, precisely on {{ expiry_date }}.{% endblocktrans %}
{% blocktrans with expiry_date=expiry_date|localize %}We inform you that the password for your account {{ username }} will expire in 7 days, precisely on {{ expiry_date }}.{% endblocktrans %}

{% trans "Kindly proceed with updating your password by clicking on the button below." %}
2 changes: 1 addition & 1 deletion openwisp_users/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def test_password_expiration_mail(self):
password_updated=user_expiry_date
)
password_expiration_email.delay()
formatted_expiry_date = (now() + timedelta(days=7)).strftime('%Y-%m-%d')
formatted_expiry_date = (now() + timedelta(days=7)).strftime('%d %b %Y')
self.assertEqual(len(mail.outbox), 1)
email = mail.outbox.pop()
self.assertEqual(email.to, [verified_email_user.email])
Expand Down

0 comments on commit 51e0292

Please sign in to comment.