Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
2ab657b10201
Commit
97a796fd
authored
May 05, 2021
by
Nicolas Chauvat
Browse files
doc: improve docstring in web.views.basecontrollers
parent
d687ed23f896
Pipeline
#66966
canceled with stages
in 1 minute and 27 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
cubicweb/server/hook.py
View file @
2ab657b1
...
...
@@ -803,7 +803,7 @@ class Operation(object):
return
-
(
i
+
1
)
def
handle_event
(
self
,
event
):
"""delegate event handling to the oper
t
aion"""
"""delegate event handling to the opera
t
ion"""
getattr
(
self
,
event
)()
def
precommit_event
(
self
):
...
...
cubicweb/web/views/basecontrollers.py
View file @
2ab657b1
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment