cellarspoon
3 years ago
No known key found for this signature in database
GPG Key ID: 3789458B3D0C410
2 changed files with
25 additions and
1 deletions
-
app.py
-
templates/index.html
|
@ -19,9 +19,18 @@ CWD = Path().resolve() |
|
|
|
|
|
|
|
|
class UploadForm(FlaskForm): |
|
|
class UploadForm(FlaskForm): |
|
|
metadata = FileField( |
|
|
metadata = FileField( |
|
|
validators=[FileAllowed(["db"], "Metadata databases only"), FileRequired()] |
|
|
"Metadata file", |
|
|
|
|
|
validators=[FileAllowed(["db"], "Metadata databases only"), FileRequired()], |
|
|
) |
|
|
) |
|
|
title = RadioField("title", choices=[("side a", "side a"), ("side b", "side b")]) |
|
|
title = RadioField("title", choices=[("side a", "side a"), ("side b", "side b")]) |
|
|
|
|
|
author = RadioField("author", choices=[("side a", "side a"), ("side b", "side b")]) |
|
|
|
|
|
tags = RadioField("tags", choices=[("side a", "side a"), ("side b", "side b")]) |
|
|
|
|
|
comments = RadioField( |
|
|
|
|
|
"comments", choices=[("side a", "side a"), ("side b", "side b")] |
|
|
|
|
|
) |
|
|
|
|
|
timestamp = RadioField( |
|
|
|
|
|
"timestamp", choices=[("side a", "side a"), ("side b", "side b")] |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route("/") |
|
|
@app.route("/") |
|
|
|
@ -9,9 +9,24 @@ |
|
|
<form method="POST" action="/upload" enctype="multipart/form-data"> |
|
|
<form method="POST" action="/upload" enctype="multipart/form-data"> |
|
|
{{ upload_form.csrf_token }} |
|
|
{{ upload_form.csrf_token }} |
|
|
|
|
|
|
|
|
|
|
|
{{ upload_form.metadata.label }} |
|
|
{{ upload_form.metadata }} |
|
|
{{ upload_form.metadata }} |
|
|
|
|
|
|
|
|
|
|
|
{{ upload_form.title.label }} |
|
|
{{ upload_form.title }} |
|
|
{{ upload_form.title }} |
|
|
|
|
|
|
|
|
|
|
|
{{ upload_form.author.label }} |
|
|
|
|
|
{{ upload_form.author }} |
|
|
|
|
|
|
|
|
|
|
|
{{ upload_form.tags.label }} |
|
|
|
|
|
{{ upload_form.tags }} |
|
|
|
|
|
|
|
|
|
|
|
{{ upload_form.comments.label }} |
|
|
|
|
|
{{ upload_form.comments }} |
|
|
|
|
|
|
|
|
|
|
|
{{ upload_form.timestamp.label }} |
|
|
|
|
|
{{ upload_form.timestamp }} |
|
|
|
|
|
|
|
|
<input type="submit" value="Go" /> |
|
|
<input type="submit" value="Go" /> |
|
|
</form> |
|
|
</form> |
|
|
|
|
|
|
|
|