Skip to content

Commit

Permalink
refactor landing html template
Browse files Browse the repository at this point in the history
  • Loading branch information
baronruk committed May 20, 2024
1 parent 0271185 commit 81240c1
Showing 1 changed file with 6 additions and 64 deletions.
70 changes: 6 additions & 64 deletions film_suggestions/templates/film_suggestions/landing.html
Original file line number Diff line number Diff line change
@@ -1,77 +1,19 @@
{% extends "base.html" %}

{% load static %}
{% load film_suggestions_tags %}

{% block title %}Discover Your Next Favorite Film{% endblock %}

{% block content %}
<form method="POST" id="suggestion-form" novalidate>
{% csrf_token %}

<div class="field {{ form.film_type.name }}
{% if form.film_type.errors %} error{% endif %}">
<div class="label">
{{ form.film_type.label }}
</div>
{{ form.film_type }}
<ul class="errorlist">
{% for error in form.film_type.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>

<div class="field {{ form.genre.name }}
{% if form.genre.errors %} error{% endif %}">
<div class="label">
{{ form.genre.label }}
</div>
{{ form.genre }}
<ul class="errorlist">
{% for error in form.genre.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>

<div class="field {{ form.release_year.name }}
{% if form.release_year.errors %} error{% endif %}">
<div class="label">
{{ form.release_year.label }}
</div>
{{ form.release_year }}
<ul class="errorlist">
{% for error in form.release_year.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>

<div class="field {{ form.preferred_actors.name }}
{% if form.preferred_actors.errors %} error{% endif %}">
<div class="label">
{{ form.preferred_actors.label }}
</div>
{{ form.preferred_actors }}
<ul class="errorlist">
{% for error in form.preferred_actors.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>

<div class="field {{ form.preferred_directors.name }}
{% if form.preferred_directors.errors %} error{% endif %}">
<div class="label">
{{ form.preferred_directors.label }}
</div>
{{ form.preferred_directors }}
<ul class="errorlist">
{% for error in form.preferred_directors.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>
{% render_field form.film_type %}
{% render_field form.genre %}
{% render_field form.release_year %}
{% render_field form.preferred_actors %}
{% render_field form.preferred_directors %}

<button type="submit">
Submit
Expand Down

0 comments on commit 81240c1

Please sign in to comment.