implementation for searching something in 'News' and 'Intern'
This commit is contained in:
33
fet2020/templates/search/index.html
Normal file
33
fet2020/templates/search/index.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<main class="container mx-auto w-full px-4 my-8 flex-1">
|
||||
<h1 class="page-title">Suchen</h1>
|
||||
<div class="sm:flex sm:flex-row-reverse justify-center text-gray-700 dark:text-gray-200">
|
||||
|
||||
<form method="get" action=".">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<input type="submit" value="Search">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% if object_list %}
|
||||
<h3>Results</h3>
|
||||
|
||||
{% for result in object_list %}
|
||||
<p>
|
||||
<a href="{{ result.get_absolute_url }}">{{ result.date|date }}: {{ result.title }}</a>
|
||||
</p>
|
||||
{% empty %}
|
||||
<p>No results found.</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{ object.title }}
|
||||
{{ object.date }}
|
||||
{{ object.etherpad|safe }}
|
||||
4
fet2020/templates/search/indexes/posts/post_text.txt
Normal file
4
fet2020/templates/search/indexes/posts/post_text.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
{{ object.title }}
|
||||
{{ object.body|safe }}
|
||||
{{ object.agenda|safe }}
|
||||
{{ object.protocol|safe }}
|
||||
Reference in New Issue
Block a user