add config file
This commit is contained in:
@ -13,6 +13,7 @@ from datetime import datetime
|
||||
import os
|
||||
import time
|
||||
import secrets
|
||||
import tomllib
|
||||
|
||||
def create_default_avatar():
|
||||
if Avatars.count() == 0:
|
||||
@ -48,6 +49,7 @@ def create_deleted_user():
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
app.config.from_file('../config/pyrom_config.toml', load=tomllib.load, text=False)
|
||||
|
||||
if os.getenv("PYROM_PROD") is None:
|
||||
app.static_folder = os.path.join(os.path.dirname(__file__), "../data/static")
|
||||
|
@ -4,9 +4,9 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{% if self.title() %}
|
||||
<title>Porom - {% block title %}{% endblock %}</title>
|
||||
<title>{{config.SITE_NAME}} - {% block title %}{% endblock %}</title>
|
||||
{% else %}
|
||||
<title>Porom</title>
|
||||
<title>{{config.SITE_NAME}}</title>
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{ "/static/style.css" | cachebust }}">
|
||||
<link rel="icon" type="image/png" href="/static/favicon.png">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<nav id="topnav">
|
||||
<span>
|
||||
<a class="site-title" href="{{url_for('topics.all_topics')}}">Porom</a>
|
||||
<a class="site-title" href="{{url_for('topics.all_topics')}}">{{config.SITE_NAME}}</a>
|
||||
</span>
|
||||
<span>
|
||||
{% if not is_logged_in() %}
|
||||
|
1
config/pyrom_config.toml
Normal file
1
config/pyrom_config.toml
Normal file
@ -0,0 +1 @@
|
||||
SITE_NAME = "Porom"
|
Reference in New Issue
Block a user