Add tests and fix bugs
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-02-11 22:40:16 +01:00
parent 54102f0d90
commit 87086cdce9
6 changed files with 203 additions and 5 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block content %}
<h1>Nothing here...</h1>
<div class="container-lg">
<h1>Nothing here...</h1>
</div>
{% endblock %}
+7 -3
View File
@@ -1,19 +1,23 @@
{% extends 'base.html' %}
{% block content %}
<div class="container-lg">
<h1>Watchlist</h1>
<h1>Watchlist</h1>
{% if object_list %}
<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>
<li>{% if movie.watched %}<i>{% endif %}<a href="{% url 'watchlist:detail' movie.id %}">{{movie.name}}</a>{% if movie.watched %}</i>{% endif %}{% if request.user.is_authenticated and movie not in voted_movies %}<sup>*</sup>{% endif %} &mdash; {{movie.score}}</li>
{% endfor %}
</ul>
{% else %}
<p>No movies yet.</p>
{% endif %}
{% 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">
<input class="btn btn-primary" type="submit" value="Submit">
</form>
{% endif %}
</div>