movieclub/templates/watchlist/index.html
Michal Kunc 232245d602
All checks were successful
continuous-integration/drone/push Build is passing
Fix marking movies as unwatched when not logged in.
2023-02-10 11:53:07 +01:00

20 lines
782 B
HTML

{% extends 'base.html' %}
{% block content %}
<div class="container-lg">
<h1>Watchlist</h1>
<ul>
{% for movie in object_list %}
<li><a href="{% url 'watchlist:detail' movie.id %}">{{movie.name}}</a>{% if request.user.is_authenticated and movie not in voted_movies %}<sup>*</sup>{% endif %} &mdash; {{movie.score}}</li>
{% endfor %}
</ul>
{% if can_add_movie %}
<h2>Submit new movie</h2>
<form action="{% url 'watchlist:submit' %}" method="post">
{% csrf_token %}
<label class="form-label" for="name">Movie name</label>
<input class="form-control" type="text" id="name" name="name" required>
<input class="btn btn-primary" type="submit" value="Sumbit">
</form>
{% endif %}
</div>
{% endblock %}