endi.views.training package¶
Submodules¶
endi.views.training.business_bpf module¶
- class endi.views.training.business_bpf.BusinessBPFDataEditView(context, request=None)¶
Bases :
BusinessBPFMixin,TreeMixin,BaseEditViewCreate+Edit view for BusinessBPFData Model
As there is maximum one BusinessBPFData per Business, this is a single view, with a « create or update » logic.
- add_template_vars = ['new_bpfdata_menu', 'other_bpf_datas', 'is_creation_form', 'context_model', 'delete_link']¶
- before(form)¶
Performs some processing on the
formprior to rendering.By default, this method does nothing. Override this method in your dervived class to modify the
form. Your function will be executed immediately after instansiating the form instance in__call__()(thus before obtaining widget resources, considering buttons, or rendering).
- children = []¶
- property context_model¶
- property delete_link¶
- get_context_model()¶
Return the model we’re editing, by default it’s the current context but in case of OneToOne relationship, it can be that the context is a related model, Overriding this method we can provide the model to edit
- Renvoie:
The model that will be edited by this view
- property is_creation_form¶
- merge_appstruct(appstruct, model)¶
Merge the appstruct with current model
- Paramètres:
appstruct (dict) – Validated form datas
model (obj) – A new instance of the object we create
- Renvoie:
The model this view is supposed to add
- on_edit(appstruct, model)¶
Hook launched before the session is flushed
- property other_bpf_datas¶
- redirect(redirect)¶
- route_name = '/businesses/{id}/bpf/{year}'¶
- schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624062176976 (named )>¶
Colander schema instance to be used to create the form instance. Provide your schema in your derived class.
- submit_success(appstruct)¶
- property title¶
str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.
- class endi.views.training.business_bpf.BusinessBPFDataListView(context, request=None)¶
Bases :
TreeMixin,BusinessBPFMixin,BaseView- property bpf_datas_links¶
- children = []¶
- route_name = '/businesses/{id}/bpf'¶
- title = 'Données BPF'¶
- property tree_url¶
- class endi.views.training.business_bpf.BusinessBPFDeleteView(context, request=None)¶
Bases :
DeleteView- dbsession: DBSESSION¶
- on_before_delete()¶
- on_delete()¶
- redirect()¶
- request: Request¶
- session: ISession¶
- class endi.views.training.business_bpf.BusinessBPFMixin¶
Bases :
object- property bpf_datas¶
- property current_business¶
- property new_bpf_years¶
The financial years eligible for new bpf data (with no existing bpf)
- Yield:
<year>, <bpf year url>
- endi.views.training.business_bpf.includeme(config)¶
endi.views.training.dashboard module¶
- class endi.views.training.dashboard.TrainingDashboardView(*args, **kwargs)¶
Bases :
GlobalBusinessListViewDashboard view allowing an employee to have an overview of its training activity
Context : Company instance
- dbsession: DBSESSION¶
- is_admin = False¶
- more_template_vars(result)¶
Add template vars to the response dict List the attributes configured in the add_template_vars attribute and add them
- query()¶
The main query, should be overrided by a subclass
- request: Request¶
- schema = <endi.forms.lists.BaseListsSchema object at 140624060587472 (named )>¶
- session: ISession¶
- title = 'Mon activité de formation'¶
- endi.views.training.dashboard.includeme(config)¶
endi.views.training.lists module¶
- class endi.views.training.lists.TrainerListView(*args, **kwargs)¶
Bases :
BaseUserListViewView listing Trainers
- dbsession: DBSESSION¶
- filter_trainer(query, appstruct)¶
- request: Request¶
- schema = <endi.forms.lists.BaseListsSchema object at 140624060331728 (named )>¶
- session: ISession¶
- title = 'Liste des formateurs de la CAE (qui ont une fiche formateur)'¶
- class endi.views.training.lists.TrainingListTools¶
Bases :
object- filter_bpf_filled(query, appstruct)¶
Double behaviour :
if a year is selected, check bpf_filled for that given year (see
filter_invoicing_year) - else check global bpf_filled indicator
- filter_company_id(query, appstruct)¶
- filter_customer_id(query, appstruct)¶
- filter_include_closed(query, appstruct)¶
- filter_invoicing_year(query, appstruct)¶
- filter_search(query, appstruct)¶
- query()¶
- schema = <endi.forms.lists.BaseListsSchema object at 140624060332688 (named )>¶
- endi.views.training.lists.includeme(config)¶
endi.views.training.routes module¶
- endi.views.training.routes.includeme(config)¶
endi.views.training.trainer module¶
- class endi.views.training.trainer.TrainerDatasDeleteView(context, request=None)¶
Bases :
DeleteViewTrainerDatas deletion view
- dbsession: DBSESSION¶
- delete_msg = 'La fiche formateur a bien été supprimée'¶
- on_delete()¶
- redirect()¶
- request: Request¶
- session: ISession¶
- class endi.views.training.trainer.TrainerDatasEditView(context, request=None)¶
Bases :
BaseEditViewTrainer datas edition view
- add_template_vars = ('delete_url', 'current_trainerdatas')¶
- before(form)¶
Performs some processing on the
formprior to rendering.By default, this method does nothing. Override this method in your dervived class to modify the
form. Your function will be executed immediately after instansiating the form instance in__call__()(thus before obtaining widget resources, considering buttons, or rendering).
- buttons = (<deform.form.Button object>, <deform.form.Button object>)¶
Tuple of buttons or strings to pass to the form instance. Override in your derived class.
- property current_trainerdatas¶
- dbsession: DBSESSION¶
- property delete_url¶
- get_context_model()¶
Return the model we’re editing, by default it’s the current context but in case of OneToOne relationship, it can be that the context is a related model, Overriding this method we can provide the model to edit
- Renvoie:
The model that will be edited by this view
- redirect(appstruct)¶
- request: Request¶
- schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624059731408 (named )>¶
Colander schema instance to be used to create the form instance. Provide your schema in your derived class.
- session: ISession¶
- property title¶
- class endi.views.training.trainer.TrainerDatasFileAddView(context, request=None)¶
Bases :
FileUploadView- dbsession: DBSESSION¶
- request: Request¶
- session: ISession¶
- title = 'Attacher un fichier à la fiche formateur de l’entrepreneur'¶
- class endi.views.training.trainer.TrainerDatasFileList(context, request=None)¶
Bases :
BaseView- property current_trainerdatas¶
- class endi.views.training.trainer.UserTrainerDatasEditView(context, request=None)¶
Bases :
TrainerDatasEditView- property current_trainerdatas¶
- dbsession: DBSESSION¶
- request: Request¶
- session: ISession¶
- class endi.views.training.trainer.UserTrainerDatasFileList(context, request=None)¶
Bases :
TrainerDatasFileList- property current_trainerdatas¶
- endi.views.training.trainer.add_views(config)¶
- endi.views.training.trainer.includeme(config)¶
Pyramid main entry point
- Paramètres:
config (obj) – The current application config object
- endi.views.training.trainer.trainerdatas_add_entry_view(context, request)¶
Trainer datas add view
- Paramètres:
context (obj) – The pyramid context (User instance)
request (obj) – The pyramid request
Module contents¶
- endi.views.training.includeme(config)¶