From cdd421e48a28fc8353db4d61fb3c88ef8ff3b2a9 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Fri, 10 Jul 2020 13:27:06 +0200 Subject: [PATCH] Rename some result views and templates --- web/app/results/views.py | 10 +++++----- web/app/templates/main/dashboard.html.j2 | 2 +- .../{import_results.html.j2 => result_import.html.j2} | 0 web/app/templates/results/results.html.j2 | 2 +- web/app/templates/services/corpus_analysis.html.j2 | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename web/app/templates/results/{import_results.html.j2 => result_import.html.j2} (100%) diff --git a/web/app/results/views.py b/web/app/results/views.py index 3e2099f2..6cc66641 100644 --- a/web/app/results/views.py +++ b/web/app/results/views.py @@ -14,9 +14,9 @@ from .. import logger from jsonschema import validate -@results.route('/import_results', methods=['GET', 'POST']) +@results.route('/import', methods=['GET', 'POST']) @login_required -def import_results(): +def result_import(): ''' View to import one json result file. Uses the ImportReultFileForm. ''' @@ -77,9 +77,9 @@ def import_results(): # deletes before created Result and ResultFile db entries tasks.delete_result(result.id) return make_response( - {'redirect_url': url_for('results.import_results')}, + {'redirect_url': url_for('results.result_import')}, 201) - return render_template('results/import_results.html.j2', + return render_template('results/result_import.html.j2', import_results_form=import_results_form, title='Add corpus file') @@ -132,7 +132,7 @@ def result_details(result_id): @login_required def result_inspect(result_id): ''' - View to inspect one importe result file in a corpus analysis like interface + View to inspect one imported result file in a corpus analysis like interface ''' display_options_form = DisplayOptionsForm( prefix='display-options-form', diff --git a/web/app/templates/main/dashboard.html.j2 b/web/app/templates/main/dashboard.html.j2 index 479f5b65..2a36f7ac 100644 --- a/web/app/templates/main/dashboard.html.j2 +++ b/web/app/templates/main/dashboard.html.j2 @@ -28,7 +28,7 @@
- Import Resultsfile_upload + Import Resultsfile_upload Show Imported Resultsfolder New corpusadd
diff --git a/web/app/templates/results/import_results.html.j2 b/web/app/templates/results/result_import.html.j2 similarity index 100% rename from web/app/templates/results/import_results.html.j2 rename to web/app/templates/results/result_import.html.j2 diff --git a/web/app/templates/results/results.html.j2 b/web/app/templates/results/results.html.j2 index 0577a1c8..ecf8095a 100644 --- a/web/app/templates/results/results.html.j2 +++ b/web/app/templates/results/results.html.j2 @@ -41,7 +41,7 @@
- Import Resultsfile_upload + Import Resultsfile_upload
diff --git a/web/app/templates/services/corpus_analysis.html.j2 b/web/app/templates/services/corpus_analysis.html.j2 index 0d0a2193..3fcd01a9 100644 --- a/web/app/templates/services/corpus_analysis.html.j2 +++ b/web/app/templates/services/corpus_analysis.html.j2 @@ -36,7 +36,7 @@
- Import Resultsfile_upload + Import Resultsfile_upload Show Imported Resultsfolder New corpusadd