geonature.core.imports.routes.imports¶
Attributes¶
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prepare data to be imported: apply all checks and transformations. |
|
Preview valid data for a given import. |
|
|
|
|
|
|
|
|
|
|
|
Downloads the report in pdf format |
|
Go through a object path to find the class to order on |
|
Module Contents¶
- geonature.core.imports.routes.imports.get_import_list(scope, destination=None)[source]¶
Get all imports to which logged-in user has access.
- geonature.core.imports.routes.imports.upload_file(scope, imprt, destination=None)[source]¶
Add an import or update an existing import.
- Form file:
file to import
- Form int datasetId:
dataset ID to which import data
- geonature.core.imports.routes.imports.get_import_columns_name(scope, imprt)[source]¶
Return all the columns of the file of an import
- geonature.core.imports.routes.imports.get_import_values(scope, imprt)[source]¶
Return all values present in imported file for nomenclated fields
- geonature.core.imports.routes.imports.prepare_import(scope, imprt)[source]¶
Prepare data to be imported: apply all checks and transformations.
- geonature.core.imports.routes.imports.preview_valid_data(scope, imprt)[source]¶
Preview valid data for a given import.
Parameters¶
- scopeint
The scope of the (C, « IMPORT », « IMPORT ») permission for the current user.
- imprtgeonature.core.imports.models.TImports
The import object.
Returns¶
- flask.wrappers.Response
A JSON response containing valid data, entities, columns, and data statistics.
Raises¶
- Forbidden
If the current user has no sufficient permission given the scope and the import object.
- Conflict
If the import is not processed, i.e. it has not been prepared yet.
- geonature.core.imports.routes.imports.get_import_errors(scope, imprt)[source]¶
Get errors of an import.
- geonature.core.imports.routes.imports.get_import_invalid_rows_as_csv(scope, imprt)[source]¶
Export invalid data in CSV.
- geonature.core.imports.routes.imports.import_valid_data(scope, imprt)[source]¶
Import valid data in destination table.
- geonature.core.imports.routes.imports.export_pdf(scope, imprt)[source]¶
Downloads the report in pdf format
- geonature.core.imports.routes.imports.get_foreign_key_attr(obj, field: str)[source]¶
Go through a object path to find the class to order on
- geonature.core.imports.routes.imports.report_plot(scope, imprt: geonature.core.imports.models.TImports)[source]¶