Function
sampleload
(filename="sampledump.txt.gz")
Source from the content-addressed store, hash-verified
| 233 | |
| 234 | @infogami.action |
| 235 | def sampleload(filename="sampledump.txt.gz"): |
| 236 | |
| 237 | with gzip.open(filename) if filename.endswith(".gz") else open(filename) as file: |
| 238 | queries = [json.loads(line) for line in file] |
| 239 | |
| 240 | print(web.ctx.site.save_many(queries, action="infogami-sampleload-action")) |
| 241 | |
| 242 | |
| 243 | class routes(delegate.page): |
Callers
nothing calls this directly
Tested by
no test coverage detected