mirror of
https://github.com/Findus23/cr-search.git
synced 2024-09-19 15:23:44 +02:00
14 lines
259 B
Python
14 lines
259 B
Python
|
import json
|
||
|
|
||
|
from models import Series
|
||
|
|
||
|
series_list = []
|
||
|
|
||
|
for series in Series.select():
|
||
|
series_list.append({"title": series.title, "id": series.id})
|
||
|
|
||
|
with open("web/data.json", "w") as f:
|
||
|
json.dump({
|
||
|
"series": series_list
|
||
|
}, f, indent=2)
|