mirror of
https://github.com/Doctorado-ML/beflask.git
synced 2025-08-15 07:05:51 +00:00
Config template
This commit is contained in:
BIN
app/app.db
BIN
app/app.db
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
import os
|
||||
import dotenv
|
||||
from benchmark.utils import Files
|
||||
from flask import (
|
||||
Blueprint,
|
||||
render_template,
|
||||
current_app,
|
||||
url_for,
|
||||
flash,
|
||||
redirect,
|
||||
@@ -56,7 +58,10 @@ def set_benchmark(benchmark_id):
|
||||
@main.route("/config")
|
||||
@login_required
|
||||
def config():
|
||||
return render_template("config.html")
|
||||
os.chdir(current_user.benchmark.folder)
|
||||
env = dotenv.dotenv_values(".env")
|
||||
print(env)
|
||||
return render_template("config.html", config_env=env)
|
||||
|
||||
|
||||
@main.route("/login", methods=["GET", "POST"])
|
||||
|
@@ -1,5 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>Home</h1>
|
||||
<p>Welcome to the home page!</p>
|
||||
<div class="alert alert-primary" role="alert">
|
||||
<h3>Configuration</h3>
|
||||
<table class="table table-stripped table-hover bg-light">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Key</th>
|
||||
<th scope="col">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item, value in config_env.items() %}
|
||||
<tr>
|
||||
<td>{{ item }}</td>
|
||||
<td>{{ value }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user