2 Commits

Author SHA1 Message Date
66d687d9f0 Update to new version 2023-10-06 18:18:50 +02:00
1d69d9fe8a Fix filtering w.r.t finalists in web styling
Mutiple rows were colored similarly of some are hidden
2023-10-06 18:17:37 +02:00
4 changed files with 10 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[Application]
name=Solo Auswertung
version=0.9.5
version=0.9.6
# How to launch the app - this calls the 'main' function from the 'myapp' package:
entry_point=main:main
# icon=myapp.ico

View File

@@ -23,7 +23,8 @@ def main():
solo_turnier.flask.startFlask(
batchWorker,
debug=cli.getLogLevel() > 0,
port=cli.getPort()
port=cli.getPort(),
showOnlyFinalists=not cli.showAllParticipants()
)
else:
combinedData = batchWorker.run(

View File

@@ -1,5 +1,8 @@
import flask
import solo_turnier
import logging
_l = logging.getLogger(__name__)
def startFlask(
batchWorker: solo_turnier.batch.BatchWorker,
@@ -12,8 +15,9 @@ def startFlask(
@app.route('/')
def index():
combinedData = batchWorker.run(False)
_l.debug('Show only finalists %s', showOnlyFinalists)
return flask.render_template('index.html', data=combinedData)
return flask.render_template('index.html', data=combinedData, onlyFinalists=showOnlyFinalists)
@app.get('/custom.css')
def css():

View File

@@ -28,6 +28,7 @@
{% if not participant.finalist %}
{% set rowCls = "no-finalist" %}
{% endif %}
{% if participant.finalist or not onlyFinalists %}
<tr class="{{ rowCls }}">
<td>{{ participant.name }} ({{ participant.id }})</td>
{% for dance in data.results[group].dances %}
@@ -47,6 +48,7 @@
{% endblock %}
{% endfor %}
</tr>
{% endif %}
{% endblock %}
{% endfor %}
</table>