__init__.py 1.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#!/usr/bin/env python3
from pathlib import Path

from flask import Flask

from validata_ui_next.validate import ValidatorHelper

# Schemas settings
schemas_config = {
    "scdl-adresses": {
        "schema_json_url": "https://git.opendatafrance.net/scdl/adresses/raw/master/schema-scdl-adresses.json",
        "custom_checks_json_url": "https://git.opendatafrance.net/scdl/adresses/raw/master/custom-checks.json"
    },
    "scdl-deliberations": {
        "schema_json_url": "https://git.opendatafrance.net/scdl/deliberations/raw/master/schema.json",
        "custom_checks_json_url": "https://git.opendatafrance.net/scdl/deliberations/raw/master/custom-checks.json"
    },
    "scdl-marches-publics": {
        "schema_json_url": "https://git.opendatafrance.net/scdl/marches-publics/raw/pdi/schema.json",
        "custom_checks_json_url": "https://git.opendatafrance.net/scdl/marches-publics/raw/pdi/custom-checks.json"
    },
    "scdl-prenoms": {
        "schema_json_url": "https://github.com/CharlesNepote/liste-prenoms-nouveaux-nes/raw/v1.1.1/prenom-schema.json",
        # "custom_checks_json_url": "https://git.opendatafrance.net/scdl/prenoms/raw/master/custom-checks.json"
    },
    "scdl-subventions": {
        "schema_json_url": "https://git.opendatafrance.net/scdl/subventions/raw/master/schema.json",
        "custom_checks_json_url": "https://git.opendatafrance.net/scdl/subventions/raw/master/custom-checks.json"
    },
}
ValidatorHelper.init(schemas_config, Path('/tmp'))

# Flask things
app = Flask(__name__)
app.secret_key = 'MyPr3ci0u5$€cr€t'

import validata_ui_next.views