Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' of https://github.com/yverdon/geocity into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
AlexandreJunod committed May 22, 2024
2 parents fb29854 + aff04ad commit 3eb474c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Geocity - build your (geo)-forms easily! ![Geocity CI](https://github.com/yverdon/geocity/workflows/Geocity%20CI/badge.svg?branch=main)

**[What is Geocity ?](https://geocity.ch/about)**
**[What is Geocity ?](https://geocity-asso.ch)**

**[Features and user guide](https://github.com/yverdon/geocity/wiki)**

Expand Down
2 changes: 1 addition & 1 deletion geocity/apps/accounts/templates/account/lockout.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3>{% translate "Votre compte a été verrouillé par mesure de sécurité. Mer
<small>
&copy; {% now "Y" %} Geocity
&nbsp;|&nbsp;
<a href="https://geocity.ch/about" target="_blank" rel="noreferrer">{% translate "A propos" %}</a>
<a href="https://geocity-asso.ch" target="_blank" rel="noreferrer">{% translate "A propos" %}</a>
{% if config.CONTACT_URL %}
&nbsp;|&nbsp;
<a href="{{ config.CONTACT_URL }}" target="_blank" rel="noreferrer">{% translate "Contact" %}</a>
Expand Down
2 changes: 1 addition & 1 deletion geocity/apps/core/templates/base_generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
<small>
&copy; {% now "Y" %} Geocity
&nbsp;|&nbsp;
<a href="https://geocity.ch/about" target="_blank" rel="noreferrer">{% translate "A propos" %}</a>
<a href="https://geocity-asso.ch" target="_blank" rel="noreferrer">{% translate "A propos" %}</a>
{% if config.CONTACT_URL %}
&nbsp;|&nbsp;
<a href="{{ config.CONTACT_URL }}" target="_blank" rel="noreferrer">{% translate "Contact" %}</a>
Expand Down
3 changes: 2 additions & 1 deletion geocity/apps/submissions/services.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import tempfile
import zipfile
from datetime import datetime
from email.header import Header

import filetype
from constance import config
Expand Down Expand Up @@ -168,7 +169,7 @@ def send_validation_reminder(submission, absolute_uri_func):

def send_email_notification(data, attachments=None):
from_email_name = (
f'{data["submission"].administrative_entity.expeditor_name} '
f'{Header(data["submission"].administrative_entity.expeditor_name, "utf-8").encode()} '
if data["submission"].administrative_entity.expeditor_name
else ""
)
Expand Down
9 changes: 6 additions & 3 deletions geocity/tests/submissions/test_a_permit_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import datetime
import re
from datetime import date
from email.header import Header

from django.conf import settings
from django.contrib.auth import get_user_model
Expand Down Expand Up @@ -2952,11 +2953,13 @@ def test_secretary_email_and_name_are_set_for_the_administrative_entity(self):
follow=True,
)

from_email = (
f'{Header("Geocity Rocks", "utf-8").encode()} <[email protected]>'
)

self.assertEqual(response.status_code, 200)
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(
mail.outbox[0].from_email, "Geocity Rocks <[email protected]>"
)
self.assertEqual(mail.outbox[0].from_email, from_email)
self.assertEqual(
mail.outbox[0].subject,
"{} ({})".format(
Expand Down

0 comments on commit 3eb474c

Please sign in to comment.