emails: address review feedback
This commit is contained in:
parent
c07a87a2b4
commit
2b92fded68
3 changed files with 6 additions and 5 deletions
|
@ -39,7 +39,7 @@ def render_with_options(template=None):
|
|||
app_logo="https://quay.io/static/img/quay-horizontal-color.svg", token="sdf8SdfKGRME9dse_dfdf",
|
||||
app_link=app_link_handler, namespace="booboo", repository="foobar", organization="buynlarge",
|
||||
admin_usernames=["lazercat", "booboocoreos"], teamname="creators", inviter="devtable",
|
||||
hosted = "Quay" in app_title, app_title = app_title, app_url="https://quay.io")
|
||||
hosted = False, app_title = app_title, app_url="https://quay.io")
|
||||
|
||||
def get_templates():
|
||||
""" Return a list of the available templates """
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import logging
|
||||
import traceback
|
||||
import json
|
||||
import features
|
||||
|
||||
from flask.ext.mail import Message
|
||||
|
||||
|
@ -54,14 +55,14 @@ def send_email(recipient, subject, template_file, parameters, action=None):
|
|||
app_url = get_app_url()
|
||||
|
||||
def app_link_handler(url=None):
|
||||
return real_url = app_url + '/' + url if url else app_url
|
||||
return app_url + '/' + url if url else app_url
|
||||
|
||||
parameters.update({
|
||||
'subject': subject,
|
||||
'app_logo': 'https://quay.io/static/img/quay-logo.png', # TODO: make this pull from config
|
||||
'app_url': app_url,
|
||||
'app_title': app_title,
|
||||
'hosted': 'Quay' in app_title,
|
||||
'hosted': features.BILLING,
|
||||
'app_link': app_link_handler,
|
||||
'action_metadata': json.dumps(action.metadata) if action else None
|
||||
})
|
||||
|
|
Reference in a new issue