search: added full-text search and docstrings

This commit is contained in:
2022-08-05 01:01:21 +02:00
parent a6e1735cac
commit 284a597d4a
15 changed files with 515 additions and 42 deletions

23
src/templates/search.html Normal file
View File

@@ -0,0 +1,23 @@
{% extends "template.html" -%}
{% block content %}
<div class="container">
<h1>Search</h1><br>
<div class="search">
<form action="{{ url_for('search') }}" method=post>
{{ form.hidden_tag() }}
{{ form.query_str }}
{{ form.submit }}
</form>
<ul>
{% for entry in results -%}
<li>
<a href="{{ url_for('entry', ident=entry.id) }}">
{{ entry.date }} {{ r_to_star(entry.rating) }} {{ entry.item.name }} ({{ entry.item.date }}) by {{ entry.user.name }}
</a>
</li>
{% endfor -%}
</ul>
</div>
</div>
{% endblock -%}