mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
[REFACTOR] Use constance variables in email template and add login URL
This commit is contained in:
@@ -348,6 +348,9 @@ CONSTANCE_CONFIG = {
|
||||
'RELATIONSHIP_FORM_HELP': (
|
||||
'',
|
||||
'Help text to display at the top of relationship forms.'),
|
||||
'DEPLOYMENT_URL': (
|
||||
'http://localhost',
|
||||
'URL at which this mapper tool is accessible'),
|
||||
'PARENT_PROJECT_NAME': (
|
||||
'',
|
||||
'Parent project name'),
|
||||
@@ -441,6 +444,9 @@ CONSTANCE_CONFIG_FIELDSETS = {
|
||||
'ORGANISATION_LIST_HELP',
|
||||
'RELATIONSHIP_FORM_HELP',
|
||||
),
|
||||
'Deployment': (
|
||||
'DEPLOYMENT_URL',
|
||||
),
|
||||
} # yapf: disable
|
||||
|
||||
CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
"description": "Default welcome email template",
|
||||
"created": "2020-04-27T12:13:30.448Z",
|
||||
"last_updated": "2020-04-27T14:45:27.152Z",
|
||||
"subject": "Welcome to {{settings.PROJECT_LONG_NAME}}",
|
||||
"content": "Dear {{ user.get_full_name }},\r\n\r\nWelcome to {{ settings.PROJECT_LONG_NAME }}.\r\n\r\nThanks,\r\n\r\nThe {{ settings.PROJECT_LONG_NAME }} team",
|
||||
"html_content": "<h1>{{ settings.PROJECT_LONG_NAME }}</h1>\r\n\r\nDear {{ user.get_full_name }},\r\n\r\nWelcome to {{ settings.PROJECT_LONG_NAME }}.\r\n\r\nThanks,\r\n\r\nThe {{ settings.PROJECT_LONG_NAME }} team",
|
||||
"subject": "Welcome to {{config.PROJECT_LONG_NAME}}",
|
||||
"content": "Dear {{ user.get_full_name }},\r\n\r\nWelcome to {{ config.PROJECT_LONG_NAME }}. You can sign in at {{ config.DEPLOYMENT_URL }}.\r\n\r\nThanks,\r\n\r\nThe {{ config.PROJECT_SHORT_NAME }} team",
|
||||
"html_content": "<h1>{{ config.PROJECT_LONG_NAME }}</h1>\r\n\r\nDear {{ user.get_full_name }},\r\n\r\nWelcome to {{ config.PROJECT_LONG_NAME }}. You can sign in <a href='{{ config.DEPLOYMENT_URL }}'>here</a>.\r\n\r\nThanks,\r\n\r\nThe {{ config.PROJECT_SHORT_NAME }} team",
|
||||
"language": "",
|
||||
"default_template": null
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ from post_office import mail
|
||||
from .organisation import Organisation
|
||||
from .question import AnswerSet, Question, QuestionChoice
|
||||
|
||||
from constance import config
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
|
||||
__all__ = [
|
||||
|
||||
Reference in New Issue
Block a user