mirror of
https://github.com/Doctorado-ML/beflask.git
synced 2025-08-15 15:15:52 +00:00
Fix some problems with password form
This commit is contained in:
@@ -106,11 +106,11 @@ def user_new():
|
||||
|
||||
|
||||
@admin.route(
|
||||
"/password/<user_id>/<back>",
|
||||
"/password/<int:user_id>/<back>",
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
@admin.route(
|
||||
"/password/<user_id>",
|
||||
"/password/<int:user_id>",
|
||||
defaults={"back": "None"},
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
@@ -35,7 +35,7 @@ def index():
|
||||
return render_template("index.html", benchmarks=benchmarks)
|
||||
|
||||
|
||||
@main.route("/set_benchmark/<benchmark_id>")
|
||||
@main.route("/set_benchmark/<int:benchmark_id>")
|
||||
@login_required
|
||||
def set_benchmark(benchmark_id):
|
||||
if int(benchmark_id) == current_user.benchmark_id:
|
||||
|
@@ -1,15 +1,17 @@
|
||||
<div class="container col-md-4 col-sm-4 col-lg-offset-4">
|
||||
<h5>Benchmarks</h5>
|
||||
<div class="list-group">
|
||||
{% for benchmark in benchmarks %}
|
||||
<a href="{{ url_for('main.set_benchmark', benchmark_id=benchmark.id) }}"
|
||||
class="list-group-item list-group-item-action flex-column align-items-start {% if benchmark == current_user.benchmark %}active{% endif %}">
|
||||
<div class="d-flex w-100 justify-content-between">
|
||||
<h5 class="mb-1">{{ benchmark.name }}</h5>
|
||||
<small>{{ benchmark.num_files }} files</small>
|
||||
</div>
|
||||
<p class="mb-1">{{ benchmark.description }}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div class="alert alert-primary" role="alert">
|
||||
<h5>Select Benchmark</h5>
|
||||
<div class="list-group">
|
||||
{% for benchmark in benchmarks %}
|
||||
<a href="{{ url_for('main.set_benchmark', benchmark_id=benchmark.id) }}"
|
||||
class="list-group-item list-group-item-action flex-column align-items-start {% if benchmark == current_user.benchmark %}active{% endif %}">
|
||||
<div class="d-flex w-100 justify-content-between">
|
||||
<h5 class="mb-1">{{ benchmark.name }}</h5>
|
||||
<small>{{ benchmark.num_files }} files</small>
|
||||
</div>
|
||||
<p class="mb-1">{{ benchmark.description }}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -18,10 +18,10 @@
|
||||
<a href="{{ url_for(config.INDEX) }}"
|
||||
class="nav-item nav-link nav-benchmark">on {{ current_user.benchmark.name }}</a>
|
||||
</li>
|
||||
<li>{{ render_nav_item('results.select', 'Results') }}</li>
|
||||
<li>{{ render_nav_item('results.datasets', 'Datasets') }}</li>
|
||||
<li>{{ render_nav_item('main.config', 'Config') }}</li>
|
||||
{% endif %}
|
||||
<li>{{ render_nav_item('results.select', 'Results') }}</li>
|
||||
<li>{{ render_nav_item('results.datasets', 'Datasets') }}</li>
|
||||
<li>{{ render_nav_item('main.config', 'Config') }}</li>
|
||||
</ul>
|
||||
<div class="navbar-nav justify-content-end">
|
||||
{% if current_user.is_authenticated %}
|
||||
|
Reference in New Issue
Block a user