Hardcode email logo to DM-Logo_compress.png and remove configurable logo path
This commit is contained in:
parent
60d2ad8325
commit
72fa09a6e1
2 changed files with 5 additions and 12 deletions
12
app.py
12
app.py
|
|
@ -299,13 +299,11 @@ def send_email(to, subject, body, attachments=None, inline_images=None):
|
|||
server.send_message(msg)
|
||||
|
||||
def build_signature_images():
|
||||
"""Return inline image tuple list for the Dionysis Media logo if present."""
|
||||
cfg = load_booth_settings()
|
||||
logo_path = cfg.get('logo_path') or '/mnt/Storage/DM-Logo_compress.png'
|
||||
logo_file = Path(logo_path)
|
||||
if not logo_file.exists():
|
||||
"""Return inline image tuple list for the Dionysis Media logo."""
|
||||
logo_path = Path('/mnt/Storage/DM-Logo_compress.png')
|
||||
if not logo_path.exists():
|
||||
return []
|
||||
return [(str(logo_file), 'dm-logo')]
|
||||
return [(str(logo_path), 'dm-logo')]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
@ -690,7 +688,6 @@ def admin_settings():
|
|||
'smtp_user': runtime_settings.get('smtp_user', current_app.config['SMTP_USER']),
|
||||
'smtp_from': runtime_settings.get('smtp_from', current_app.config['SMTP_FROM']),
|
||||
'smtp_pass_set': bool(runtime_settings.get('smtp_pass', '')),
|
||||
'logo_path': runtime_settings.get('logo_path', '/mnt/Storage/DM-Logo_compress.png'),
|
||||
}
|
||||
|
||||
# Compute upload folder stats.
|
||||
|
|
@ -801,7 +798,6 @@ def admin_settings():
|
|||
cfg['smtp_port'] = request.form.get('smtp_port', '').strip() or None
|
||||
cfg['smtp_user'] = request.form.get('smtp_user', '').strip() or None
|
||||
cfg['smtp_from'] = request.form.get('smtp_from', '').strip() or None
|
||||
cfg['logo_path'] = request.form.get('logo_path', '').strip() or None
|
||||
new_pass = request.form.get('smtp_pass', '').strip()
|
||||
# Only overwrite the stored password if a new value was provided.
|
||||
if new_pass:
|
||||
|
|
|
|||
Reference in a new issue