edh-elo/app/templates/seed.html
Jack Jackson 9b4e6c3b4d
All checks were successful
Publish / build-and-push (push) Successful in 6m14s
Introduce ability to seed data directly from GSheet
Reasonably hacky, in that I introduce a facade to reuse the data format
previously provided by the `csv` module, rather than using the
`list[list[str]]` directly.

Next I want to introduce something like Celery to continually refresh.

Note that this will require changes to the deployment repo in order to
provide the required secrets.
2025-04-17 22:22:21 -07:00

42 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% block title %}Seeding from files{% endblock %}
{% block head %}
{{ super() }}
{% endblock %}
{% block content %}
<h2>Seed from files</h2>
<div>
<form action="/api/seed/players" method="post" enctype="multipart/form-data">
<label for="file">Upload Players</label>
<input type="file" id="file" name="file" accept=".csv"/>
<input type="submit">Upload</button>
</form>
</div>
<div>
<form action="/api/seed/decks" method="post" enctype="multipart/form-data">
<label for="file">Upload Decks</label>
<input type="file" id="file" name="file" accept=".csv"/>
<input type="submit">Upload</button>
</form>
</div>
<div>
<form action="/api/seed/games" method="post" enctype="multipart/form-data">
<label for="file">Upload Games</label>
<input type="file" id="file" name="file" accept=".csv"/>
<input type="submit">Upload</button>
</form>
</div>
<hr/>
<div>
<form action="/api/seed/from_google_sheets" method="post" enctype="multipart/form-data">
<input type="submit">Trigger Seed from Google Sheets</button>
</form>
</div>
{% endblock %}