fix: テンプレートへの埋込時にクォートがおかしくなる問題を修正
This commit is contained in:
parent
52976343f7
commit
6ad11cbac7
@ -61,7 +61,10 @@ class BioViewModel(BaseModel):
|
||||
# 呼び出し一回あたりの分割数
|
||||
part_size = 500
|
||||
for i in range(0, search_data_len, part_size):
|
||||
yield json.dumps(search_data_list[i:i + part_size], ensure_ascii=False, default=date_handler)
|
||||
json_str = json.dumps(search_data_list[i:i + part_size], ensure_ascii=False, default=date_handler)
|
||||
# テンプレートに埋め込むため、ダブルクォートをエスケープして返す
|
||||
json_str = json_str.replace('"', '\\"')
|
||||
yield json_str
|
||||
|
||||
def make_whs_name(self):
|
||||
if not self.is_form_submitted():
|
||||
|
||||
@ -340,7 +340,7 @@
|
||||
// {% autoescape False%}
|
||||
// ジェネレータで100件ずつ取ってリストに詰める
|
||||
// {% for bio_data_json_str in bio.bio_data_json_str() %}
|
||||
searchResultData.push(...JSON.parse('{{bio_data_json_str}}'))
|
||||
searchResultData.push(...JSON.parse("{{bio_data_json_str}}"))
|
||||
// {% endfor %}
|
||||
// {% endautoescape%}
|
||||
// {% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user