Commit 3e1978f3 authored by Pierre Dittgen's avatar Pierre Dittgen

Add datetime in validation report

parent 6d2b8a64
......@@ -5,6 +5,7 @@
{% endblock %}
{% block content %}
<h1>{{ title }}</h1>
<p class="text">Validation effectuée {{ validation_date }}</p>
{# Schema info #}
<div class="row">
......
......@@ -6,19 +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 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
import tabulator
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
def extract_source_data(source: ValidataSource, preview_rows_nb=5):
......@@ -210,6 +210,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