mirror of
https://github.com/Doctorado-ML/beflask.git
synced 2025-08-16 07:35:51 +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,5 +1,6 @@
|
||||
<div class="container col-md-4 col-sm-4 col-lg-offset-4">
|
||||
<h5>Benchmarks</h5>
|
||||
<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) }}"
|
||||
@@ -12,4 +13,5 @@
|
||||
</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>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="navbar-nav justify-content-end">
|
||||
{% if current_user.is_authenticated %}
|
||||
|
Reference in New Issue
Block a user