File size: 961 Bytes
f619d18 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
{% extends "base.html" %}
{% block content %}
<h2>{{ question.content }}</h2>
<h3>Comments</h3>
<ul>
{% for comment in question.comments %}
<li>
<p><strong>{{ comment.username }}</strong></p>
{% if comment.audio_file %}
<audio controls>
<source src="{{ url_for('static', filename='audio/' ~ comment.audio_file) }}" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
{% endif %}
<p>{{ comment.text_reply }}</p>
</li>
{% endfor %}
</ul>
<h3>Add a Comment</h3>
<form action="{{ url_for('question', question_id=question.id) }}" method="post" enctype="multipart/form-data">
<input type="text" name="username" placeholder="Your name" required><br>
<textarea name="text_reply" placeholder="Your comment"></textarea><br>
<input type="file" name="audio" accept="audio/*"><br>
<button type="submit">Submit</button>
</form>
{% endblock %}
|