Commit 97a796fd authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

doc: improve docstring in web.views.basecontrollers

parent d687ed23f896
Pipeline #66966 canceled with stages
in 1 minute and 27 seconds
......@@ -803,7 +803,7 @@ class Operation(object):
return -(i + 1)
def handle_event(self, event):
"""delegate event handling to the opertaion"""
"""delegate event handling to the operation"""
getattr(self, event)()
def precommit_event(self):
......
......@@ -203,6 +203,16 @@ def _validation_error(req, ex):
def _validate_form(req, vreg):
"""
helper function for FormValidatorController.publish()
return (status, args, entity) that will be passed as argument
result to `cubicweb.edition.js:handleFormValidationResult(..., result, ...)`
status: bool True if valid else False
args: target location if status is True else error message
entity: entity being edited
"""
# XXX should use the `RemoteCallFailed` mechanism
try:
ctrl = vreg["controllers"].select("edit", req=req)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment