Remove add-partition template

This commit is contained in:
augustin64 2023-06-15 21:55:01 +02:00
parent 4e6421f9dc
commit 4c29460ab2
2 changed files with 1 additions and 26 deletions

View File

@ -229,7 +229,7 @@ def delete_album(uuid):
return redirect("/albums") return redirect("/albums")
@bp.route("/<album_uuid>/add-partition", methods=["GET", "POST"]) @bp.route("/<album_uuid>/add-partition", methods=["POST"])
@login_required @login_required
def add_partition(album_uuid): def add_partition(album_uuid):
db = get_db() db = get_db()
@ -240,9 +240,6 @@ def add_partition(album_uuid):
flash("Vous ne participez pas à cet album.") flash("Vous ne participez pas à cet album.")
return redirect(f"/albums/{album.uuid}") return redirect(f"/albums/{album.uuid}")
if request.method == "GET":
return render_template("albums/add-partition.html", album=album, user=user)
error = None error = None
if "name" not in request.form: if "name" not in request.form:

View File

@ -1,22 +0,0 @@
{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}Ajouter une partition à {{ album.name }}{% endblock %}</h1>
{% endblock %}
{% block content %}
<form action="/albums/{{ album.uuid }}/add-partition" method="post" enctype="multipart/form-data">
Titre*
<input name="name" type="text" required />
Auteur
<input name="author" type="text" />
Paroles
<textarea id="paroles" name="body" type="text"></textarea>
{% if partition_uuid %}
<input name="partition-uuid" value="{{ partition_uuid }}" type="hidden">
{% else %}
<input name="file" type="file" required />
{% endif %}
<input type="submit" value="Ajouter" />
</form>
{% endblock %}