Added working WTForm to get URL at /downloader

This commit is contained in:
Maximilian Wagner
2023-07-30 13:59:11 +02:00
parent 1f070ece5d
commit 62ab798e7c
4 changed files with 36 additions and 18 deletions

View File

@@ -1,17 +1,15 @@
{%- extends "base.html" %}
{% import "bootstrap/utils.html" as utils %}
{% block content %}
<div class="container">
{%- with messages = get_flashed_messages(with_categories=True) %}
{%- if messages %}
<div class="row">
<div class="col-md-12">
{{utils.flashed_messages(messages)}}
</div>
</div>
{%- endif %}
{%- endwith %}
<form method="POST">
{{ form.csrf_token }}
<label for="url">Video, Channel or Playlist</label> <br>
<input id="url" name="url" required type="url" placeholder="YouTube Link">
<input type="submit" value="Go">
</form>
{% if form.errors %}
{{ form.errors['url'][0][:-1] + ', try again.' }}
{% endif %}
</div>
{%- endblock %}