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
cubes
rqlcontroller
Commits
1018a4076367
Commit
5c11d224
authored
Oct 15, 2021
by
Elouan Martinet
Browse files
[views] Only allow JSON requests on get_entities
Also redefine __select__ as parent classes require a version in the URL.
parent
285b56d89d49
Pipeline
#88660
canceled with stages
in 1 minute and 4 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
cubicweb_rqlcontroller/views.py
View file @
1018a407
...
...
@@ -227,13 +227,16 @@ class AnonMultipartRqlIOController(BaseRqlIOController):
require_csrf
=
False
class
GetEntitiesRqlIOController
(
Json
RqlIOController
):
class
GetEntitiesRqlIOController
(
Base
RqlIOController
):
"""GetEntitiesRqlIOController allow to get entities attributes
from a RQL. Only attributes present in the RQL will be sent.
"""
__regid__
=
"rqlio_entities"
__select__
=
match_http_method
(
"POST"
)
__select__
=
match_http_method
(
"POST"
)
&
match_request_content_type
(
"application/json"
,
mode
=
"any"
)
require_csrf
=
False
def
publish
(
self
,
rset
=
None
):
self
.
_cw
.
ajax_request
=
True
...
...
Write
Preview
Markdown
is supported
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