From a54b0a4b53a36c2376708c9c24f662efdd4e96ce Mon Sep 17 00:00:00 2001 From: gashapwn Date: Sat, 28 Nov 2020 06:15:29 +0000 Subject: [PATCH] added admin_email to conf --- app.py | 4 ++++ lyadmin.conf.json | 1 + templates/main_layout.html | 2 +- templates/signup.html | 3 +-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 21d64c7..154bef8 100644 --- a/app.py +++ b/app.py @@ -214,6 +214,10 @@ def signup(): def get_site_name(): return {"site_name": conf_obj["site_name"]} +@app.context_processor +def get_admin_email(): + return {"admin_email": conf_obj["admin_email"]} + def check_pwd_for_conf(): pwd_file_list = list(map( lambda path : path.split("/")[-1], diff --git a/lyadmin.conf.json b/lyadmin.conf.json index b6b8e79..c0e2cfc 100644 --- a/lyadmin.conf.json +++ b/lyadmin.conf.json @@ -1,5 +1,6 @@ { "site_name": "tildezero.xyz", + "admin_email": "admin@example.com", "listen_ip": "127.0.0.1", "shell": { "SHELL_BASH": "/usr/local/bin/bash", diff --git a/templates/main_layout.html b/templates/main_layout.html index f836431..6b24f2b 100644 --- a/templates/main_layout.html +++ b/templates/main_layout.html @@ -17,6 +17,6 @@ {% if page_name == "home" %}
- + {% endif %} diff --git a/templates/signup.html b/templates/signup.html index 65a532f..e4992f4 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -14,8 +14,7 @@ this page will be updated with your username once approved

{% endif %}

- if you have questions, email gashapwn@protonmail.com - or DM gashapwn on IRC at irc.lainchan.org + if you have questions, email {{ admin_email }}

{%endblock%}