endi.views.statistics package

Submodules

endi.views.statistics.rest_api module

class endi.views.statistics.rest_api.RestStatisticCriterion(context, request=None)

Bases : BaseRestView

Api rest pour la gestion des critères statistiques

after_flush(criterion, edit, attributes)

Allows to modify datas after the main entry was flushed

HTTP POST and PUT calls

Paramètres:
  • entry – The instance added/edited

  • edit (bool) – Is it an edition view ?

  • attributes (dict) – The validated submitted data

collection_get()

Return the list of top level criteria (not those combined in Or or And clauses context is the current entry

dbsession: DBSESSION
get_schema(submitted)

Build the colander schema to be used

Paramètres:

submitted – Data submitted to the api endpoint

Renvoie:

A form schema used to validate the submitted data

on_delete()

On delete we clean the tree to avoid void nodes

We delete the and/or/onetomany clauses if there are no children left except for the root node

post_format(criterion, edit, attributes)

Handle clause insertion inside the criterion tree if needed

pre_delete()
pre_format(values, edit=False)

Since when serializing a multi select on the client side, we get a list OR a string, we need to enforce getting a string

request: Request
session: ISession
class endi.views.statistics.rest_api.RestStatisticEntry(context, request=None)

Bases : BaseRestView

Json rest api for statistic entries handling

collection_get()

Return the list of entries context is the parent sheet

dbsession: DBSESSION
duplicate_view()
post_format(entry, edit, attributes)

Allows to apply post formatting to the model before flushing it

HTTP POST and PUT calls

Paramètres:
  • entry – The instance added/edited

  • edit (bool) – Is it an edition view ?

  • attributes (dict) – The validated submitted data

request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624077335440 (named )>
session: ISession
class endi.views.statistics.rest_api.RestStatisticSheet(context, request=None)

Bases : BaseRestView

Json rest api for statistic sheet handling

collection_get()
dbsession: DBSESSION
form_config()
load_manytoone(inspector, res=None)

Return the opt rel options

load_sheet_list()
load_static_options(inspector, res=None)

Return the options for static selectable elements

request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624077336016 (named )>
session: ISession
endi.views.statistics.rest_api.includeme(config)

endi.views.statistics.routes module

endi.views.statistics.routes.get_sheet_url(request, sheet=None, _query={}, suffix='', api=False)
endi.views.statistics.routes.includeme(config)

endi.views.statistics.statistics module

Module contents

endi.views.statistics.includeme(config)