This commit is contained in:
Punnamaraju Vinayaka Tejas 2023-07-12 15:37:40 +05:30
parent de094d4bed
commit bda624e4dc
3 changed files with 14 additions and 4 deletions

View file

@ -8,9 +8,13 @@ def create_app(test_config=None):
app.config.from_mapping(
SECRET_KEY='dev',
DATABASE=os.path.join(app.instance_path, 'flaskr.sqlite'),
REGISTER=False
REGISTER=False,
NAME='Flaskr'
)
if app.config.get('STATIC_FOLDER') is not None:
app.static_folder = app.config.get('STATIC_FOLDER')
app.wsgi_app = ProxyFix(
app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1
)

View file

@ -1,9 +1,9 @@
<!doctype html>
<title>{% block title %}{% endblock %} - Flaskr</title>
<title>{% block title %}{% endblock %} - {{ config['NAME'] }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}">
<nav>
<h1>Flaskr</h1>
<h1>{{ config['NAME'] }}</h1>
<ul>
{% if g.user %}
<li><span>{{ g.user['username'] }}</span>