Skip to content

Commit

Permalink
Merge pull request #18 from camptocamp/generalisation
Browse files Browse the repository at this point in the history
code generalisation and i18n
  • Loading branch information
marionb authored Jun 24, 2024
2 parents 8e1f3d1 + e782a7f commit f8a0f95
Show file tree
Hide file tree
Showing 31 changed files with 3,956 additions and 294 deletions.
3 changes: 2 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ALLOWED_HOST=localhost,127.0.0.1,proxy.example.com
# Base URL of the api
ROOTURL=

DEFAULT_FROM_EMAIL=no-reply@ne.ch
DEFAULT_FROM_EMAIL=no-reply@geoshop.ch
EMAIL_HOST=smtp.example.com
ADMIN_EMAIL_LIST=[email protected]

Expand All @@ -40,6 +40,7 @@ INTRA_LEGEND_URL=https://example.com/mapserv_proxy?ogcserver=source+for+image%2F
# Only for testing purpose
EMAIL_TEST_TO=[email protected]

DEFAULT_LANGUAGE=en
# For non-docker, uncomment this (only tested in Windows)
#GDAL_PATH="C:\Applications\Mapserver72_x64\bin"
#GDAL_LIBRARY_PATH="C:\Applications\Mapserver72_x64\bin\gdal300.dll"
Expand Down
3 changes: 2 additions & 1 deletion api/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def __call__(self, _, filename):


def _render_email_templates(template_name, template_data):
html_template_name = '{}_{}.html'.format(template_name, LANG)
html_template_name = '{}.html'.format(template_name)
template_data['REPLY_TO_EMAIL'] = settings.REPLY_TO_EMAIL
return (
render_to_string(html_template_name, template_data),
get_template(html_template_name).render(template_data),
Expand Down
Loading

0 comments on commit f8a0f95

Please sign in to comment.