{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% block title %}
{% if form.is_valid and search_text %}
Search Results for "{{ search_text }}"
{% else %}
Book Search
{% endif %}
{% endblock %}
{% block content %}
Search for Books
{% crispy form %}
{% if form.is_valid and search_text %}
Wyniki wyszukiwania dla {{ search_text }}
{% for book in books %}
Tytuł {{ book }} Współtwórcy:
{% for contributor in book.contributors.all %}
{{ contributor.first_names }} {{ contributor.last_names }}{% if not forloop.last %}, {% endif %}
{% endfor %}