Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
52c142f3
Commit
52c142f3
authored
Jul 03, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_hal_json_style: global appcache var removed
parent
8da0313f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+6
-8
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
52c142f3
...
...
@@ -66,9 +66,6 @@ from collections import OrderedDict
MARKER
=
[]
COUNT_LIMIT
=
1000
# TODO replace appcache var use by (mode = 'appcache')
appcache
=
True
if
mode
==
"appcache"
else
False
if
REQUEST
is
None
:
recursive_call
=
True
REQUEST
=
context
.
REQUEST
...
...
@@ -868,7 +865,7 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, k
return
result
def
renderForm
(
traversed_document
,
form
,
response_dict
,
key_prefix
=
None
,
selection_params
=
None
,
extra_param_json
=
None
):
def
renderForm
(
traversed_document
,
form
,
response_dict
,
key_prefix
=
None
,
selection_params
=
None
,
extra_param_json
=
None
,
appcache
=
False
):
"""
Render a `form` in plain python dict.
...
...
@@ -963,7 +960,8 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
is_portal
=
False
,
mode
=
'traverse'
,
restricted
=
1
,
view
=
'view'
view
=
'view'
,
appcache
=
appcache
)
}
...
...
@@ -1205,7 +1203,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
response
=
None
,
view
=
None
,
mode
=
None
,
query
=
None
,
select_list
=
None
,
limit
=
None
,
form
=
None
,
relative_url
=
None
,
restricted
=
None
,
list_method
=
None
,
default_param_json
=
None
,
form_relative_url
=
None
,
extra_param_json
=
None
):
default_param_json
=
None
,
form_relative_url
=
None
,
extra_param_json
=
None
,
appcache
=
False
):
if
(
not
appcache
)
and
(
restricted
==
1
)
and
(
portal
.
portal_membership
.
isAnonymousUser
()):
login_relative_url
=
site_root
.
getLayoutProperty
(
"configuration_login"
,
default
=
""
)
...
...
@@ -2283,7 +2281,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
}
# TODO: get from this method what is needed for appcaching, and avoid all rendering stuff
renderForm(traversed_document, view_instance, embedded_dict,
selection_params=extra_param_json, extra_param_json=extra_param_json)
selection_params=extra_param_json, extra_param_json=extra_param_json
, appcache=True
)
result_dict['
_embedded
'] = {
'
_view
': embedded_dict
}
...
...
@@ -2356,7 +2354,7 @@ hateoas = calculateHateoas(relative_url=relative_url,
restricted
=
restricted
,
list_method
=
list_method
,
default_param_json
=
default_param_json
,
form_relative_url
=
form_relative_url
,
extra_param_json
=
extra_param_json
)
extra_param_json
=
extra_param_json
,
appcache
=
mode
==
"appcache"
)
# [HARDCODED] expresion string:${object_url} must be evaluated before return
...
...
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