Add game answer functionality with form and view for user responses
This commit is contained in:
parent
6dbb1a54e0
commit
d03d3b48d4
9 changed files with 97 additions and 12 deletions
|
@ -12,7 +12,7 @@
|
|||
<i class="ri-vip-crown-fill"></i>
|
||||
</th>
|
||||
<th>
|
||||
<i class="ri-mv-line"></i>
|
||||
<i class="ri-mv-fill"></i>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
26
game/templates/game/musikgame_answer.html
Normal file
26
game/templates/game/musikgame_answer.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h2>Mes réponses</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<i class="ri-mv-fill" alt="Musique"></i>
|
||||
</th>
|
||||
<th>Réponse</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for field in form %}
|
||||
<tr>
|
||||
<td>{{ field.label }}</td>
|
||||
<td>{{ field }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="submit">Valider mes réponses</button>
|
||||
</form>
|
||||
{% endblock content %}
|
|
@ -10,6 +10,9 @@
|
|||
href="{% yt_playlist musikgame %}"
|
||||
role="button"
|
||||
{% if musikgame.playlist_loading %}aria-busy="true"{% endif %}><i class="ri-youtube-fill"></i> Playlist</a>
|
||||
<a target="_blank"
|
||||
href="{% url "game_answer" musikgame.pk %}"
|
||||
role="button"><i class="ri-play-list-2-fill"></i> Répondre</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
<h2>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue