Commit d5ee2f04 authored by Pierre Dittgen's avatar Pierre Dittgen

Clean report and adapt it to message transition

parent c2b4e81b
......@@ -6,28 +6,19 @@ import copy
import json
import os
from collections import OrderedDict
from datetime import datetime
from io import BytesIO
from pathlib import Path
from commonmark import commonmark
from flask import Flask, jsonify, redirect, render_template, request, url_for
import tabulator
from validata_ui import app
from validata_ui import app, error_messages
from validata_ui.util import (ValidataSource, flash_error, flash_info,
flash_success, flash_warning)
from validata_ui.validate_helper import ValidatorHelper
from validata_validate import csv_helpers
from validata_validate.loaders import custom_loaders
from validata_ui import app
from validata_ui.util import flash_error, flash_info, flash_success, flash_warning, ValidataSource
from validata_ui.validate_helper import ValidatorHelper
from validata_ui import error_messages
from flask import Flask, jsonify, redirect, render_template, request, url_for
import tabulator
from io import BytesIO
def extract_source_data(source: ValidataSource, preview_rows_nb=5):
......@@ -190,6 +181,7 @@ def validate(schema_code, source: ValidataSource):
val_info = ValidatorHelper.schema_info(schema_code)
return render_template('validation_report.html', title='Rapport de validation',
val_info=ValidatorHelper.schema_info(schema_code), report=validata_report,
validation_date=datetime.now().strftime('le %d/%m/%Y à %Hh%M'),
source=source, source_type=source.type, source_data=source_data,
report_str=json.dumps(validata_report, sort_keys=True, indent=2),
breadcrumbs=[{'url': url_for('home'), 'title': 'Accueil'},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment