fix: テンプレートへの埋込時にクォートがおかしくなる問題を修正
This commit is contained in:
parent
aacbeb9687
commit
b6468a45dc
@ -61,7 +61,10 @@ class BioViewModel(BaseModel):
|
|||||||
# 呼び出し一回あたりの分割数
|
# 呼び出し一回あたりの分割数
|
||||||
part_size = 500
|
part_size = 500
|
||||||
for i in range(0, search_data_len, part_size):
|
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):
|
def make_whs_name(self):
|
||||||
if not self.is_form_submitted():
|
if not self.is_form_submitted():
|
||||||
|
|||||||
@ -340,7 +340,7 @@
|
|||||||
// {% autoescape False%}
|
// {% autoescape False%}
|
||||||
// ジェネレータで100件ずつ取ってリストに詰める
|
// ジェネレータで100件ずつ取ってリストに詰める
|
||||||
// {% for bio_data_json_str in bio.bio_data_json_str() %}
|
// {% 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 %}
|
// {% endfor %}
|
||||||
// {% endautoescape%}
|
// {% endautoescape%}
|
||||||
// {% endif %}
|
// {% endif %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user