mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-21 05:43:22 -07:00
Add setting for custom newsletter templates folder
This commit is contained in:
parent
031d078bc2
commit
826db082c9
4 changed files with 18 additions and 3 deletions
|
@ -267,8 +267,11 @@ def send_newsletter(newsletter_id=None, subject=None, body=None, message=None, n
|
|||
|
||||
|
||||
def serve_template(templatename, **kwargs):
|
||||
interface_dir = os.path.join(str(plexpy.PROG_DIR), 'data/interfaces/')
|
||||
template_dir = os.path.join(str(interface_dir), plexpy.CONFIG.NEWSLETTER_TEMPLATES)
|
||||
if plexpy.CONFIG.NEWSLETTER_CUSTOM_DIR:
|
||||
template_dir = plexpy.CONFIG.NEWSLETTER_CUSTOM_DIR
|
||||
else:
|
||||
interface_dir = os.path.join(str(plexpy.PROG_DIR), 'data/interfaces/')
|
||||
template_dir = os.path.join(str(interface_dir), plexpy.CONFIG.NEWSLETTER_TEMPLATES)
|
||||
|
||||
_hplookup = TemplateLookup(directories=[template_dir], default_filters=['unicode', 'h'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue