geonature.core.gn_synthese.blueprints.reports

Attributes

Functions

create_report(permissions)

Create a report (e.g report) for a given synthese id

notify_new_report_change(synthese, user, id_roles, content)

update_content_report(id_report)

Modify a report (e.g report) for a given synthese id

sort_reports(query, orderby[, sort])

Utility function. Sort a reports query according to given params,

list_all_reports(permissions)

list_reports(permissions, id_synthese)

delete_report(id_report)

Module Contents

geonature.core.gn_synthese.blueprints.reports.reports_blueprint[source]
geonature.core.gn_synthese.blueprints.reports.create_report(permissions)[source]

Create a report (e.g report) for a given synthese id

Returns

report: json:

Every occurrence’s report

geonature.core.gn_synthese.blueprints.reports.notify_new_report_change(synthese, user, id_roles, content)[source]
geonature.core.gn_synthese.blueprints.reports.update_content_report(id_report)[source]

Modify a report (e.g report) for a given synthese id

Returns

report: json:

Every occurrence’s report

geonature.core.gn_synthese.blueprints.reports.sort_reports(query, orderby, sort='asc')[source]

Utility function. Sort a reports query according to given params, or raise an error if these params are invalid.

Params

query: sa query:

The query, sorted according to given params

orderby: string:

Field name to sort the query on. Must be one of the fieldnames listed in SORT_COLUMNS.

sort: string:

The order of the sort. Default is ascending order.

Returns

query: sa query:

The query, sorted according to given params

geonature.core.gn_synthese.blueprints.reports.list_all_reports(permissions)[source]
geonature.core.gn_synthese.blueprints.reports.list_reports(permissions, id_synthese)[source]
geonature.core.gn_synthese.blueprints.reports.delete_report(id_report)[source]