refactor httpdemo 1

This commit is contained in:
2023-04-13 09:46:37 +02:00
parent e757290649
commit d95fa436eb
2 changed files with 35 additions and 56 deletions

View File

@@ -1,10 +1,23 @@
<html>
<body>
<h1>Hello Index httpdemo</h1>
<p><pre>{{request}}</pre></p>
<ul>{% for r in results %}
<li><a href="{{r['url'}}">
{{r["body"]|safe}}
</li></a>
<h1>Suche:</h1>
<p><form action="" href="#"><input name="q" /></form></p>
<p><b>Message:</b>{{message}}</p>
<ul style="list-style: none;">
{% for r in results %}
<li>
<a href="https://{{r['_source']['url']}}">
{{r["_source"]["title"]|safe }}
</a>
{% for hh in r["highlight"] %}
{% for h in r["highlight"][hh] %}
{{ h |safe}} <br />
{% endfor %}
{% endfor %}
</li>
{% endfor %}
</ul>
</body>
</body>
</html>