Lagt til søkeside. Mye flikking på url-configen.
This commit is contained in:
13
python/web/templates/index.html
Normal file
13
python/web/templates/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends "base/main.html" %}
|
||||
|
||||
{% block title %}
|
||||
Worblehat 0.1. Heisann!!
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Velkommen til PVVs bokdatabase, Worblehat.<br>
|
||||
Her kan du søke etter bøker til din hjertens lyst.<br>
|
||||
<form action="/let/" method="get">
|
||||
<input type="text" name="searchterm"> <input type="submit" value="Søk!"><br>
|
||||
</form>
|
||||
{% endblock %}
|
@@ -7,6 +7,6 @@ Worblehat 0.1: {{ person.first_name }} {{ person.last_name }}
|
||||
{% block content %}
|
||||
<span class="key">Name:</span> {{person.first_name}} {{person.last_name}}<br>
|
||||
{% for book in books %}
|
||||
<span class="key">{{ book.relation.name }} of:</span> <a href=/book/{{ book.book.isbn }}>{{ book.book.title }}</a> <br>
|
||||
<span class="key">{{ book.relation.name }} of:</span> <a href=/bok/{{ book.book.isbn }}>{{ book.book.title }}</a> <br>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
21
python/web/templates/search/search.html
Normal file
21
python/web/templates/search/search.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends "base/main.html" %}
|
||||
|
||||
{% block title %}
|
||||
Worblehat 0.1: Søk!
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Du søkte på {{ search_string }}.<br>
|
||||
{% if people %}
|
||||
Personer:<br>
|
||||
{% for person in people %}
|
||||
<a href="/person/{{ person.id }}/">{{ person.first_name }} {{ person.last_name }}</a><br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if books %}
|
||||
Bøker:<br>
|
||||
{% for book in books %}
|
||||
<a href="/bok/{{ book.isbn }}/">{{ book.title }}</a><br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user