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
Merret Buurman
pidlandingpage
Commits
605bf065
Commit
605bf065
authored
Aug 05, 2016
by
Merret Buurman
Browse files
Remove hdl: from handle before even making html pages.
parent
fc27b94e
Changes
1
Hide whitespace changes
Inline
Side-by-side
landingpage/landingpageapp/pages/cmip6/entrypoint.py
View file @
605bf065
...
...
@@ -7,6 +7,7 @@ from landingpage.landingpageapp.handle import retrieval, cmip6parser
def
get_html_string
(
request
,
prefix
,
suffix
):
prefix
=
_remove_hdl_from_prefix
(
prefix
)
json_record
=
retrieval
.
get_handle_record_json
(
prefix
+
'/'
+
suffix
)
context
=
_get_context_for_aggregation_level
(
json_record
)
template
=
_get_template_for_aggregation_level
(
json_record
)
...
...
@@ -34,3 +35,8 @@ def _get_context_for_aggregation_level(json_record):
def
_get_handle_info_for_dataset
(
values
):
return
{}
def
_remove_hdl_from_prefix
(
prefix
):
if
prefix
.
startswith
(
'hdl:'
):
return
prefix
.
replace
(
'hdl:'
,
''
)
else
:
return
prefix
\ No newline at end of file
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