Add search
This commit is contained in:
parent
b5b240fb99
commit
942965d262
5 changed files with 90 additions and 3 deletions
|
|
@ -96,7 +96,7 @@
|
|||
</small>
|
||||
</div>
|
||||
<div class="right">
|
||||
<form action="#" method="get">
|
||||
<form action="{% url 'search' %}" method="get">
|
||||
<input type="text" name="q" placeholder="Search" />
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
|
|
|
|||
15
templates/search.html
Normal file
15
templates/search.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h2>
|
||||
Searched for:
|
||||
"{{ query|default:"Search" }}"
|
||||
</h2>
|
||||
{% if feeds %}
|
||||
{% for feed in feeds %}
|
||||
<a href="{% url 'feed' feed.id %}">{{ feed.feed_url|default:"Unknown Feed" }} →</a>
|
||||
<br>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>No results found.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue