This repository has been archived on 2023-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
paste/paste/templates/home.html.j2
Ada fc8527d69f
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
add(backend): possibility to delete paste
2023-09-26 14:53:08 +02:00

22 lines
881 B
Django/Jinja
Executable file

<form id="paste-content" method="POST" accept-charset="UTF-8" action="{{ url_for('home.create') }}">
<textarea name="content" form="paste-content">Enter text here...</textarea>
<label for="time">Time in second</label>
<input id="time" name="time">
<input type="submit">
</form>
{% with messages = get_flashed_messages(category_filter=["create"]) %}
{% if messages[0] %}
<p>Paste available at : <a href="{{ request.base_url }}{{ messages[0] }}">{{ messages[0] }}</a></p>
{% endif %}
{% if messages[1] %}
<p>You can delete paste with : <a href="{{ request.base_url }}delete/{{ messages[0] }}?secret={{ messages[1] }}">delete</a></p>
{% endif %}
{% endwith %}
{% with messages = get_flashed_messages(category_filter=["delete"]) %}
{% if messages[0] %}
<p>Paste {{ messages[0] }} deleted </p>
{% endif %}
{% endwith %}