aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-07-04 12:08:21 -0500
committerJesús <heckyel@hyperbola.info>2021-07-04 12:08:21 -0500
commit49d823e13528536d064d32f7fb84c2f13448db21 (patch)
treef9274891ae34855a6f23fe750d2e2e1ddda6b93c /youtube
parentde5510d3e36759fd70e07448c4bff0b301caa97c (diff)
downloadyt-local-49d823e13528536d064d32f7fb84c2f13448db21.tar.lz
yt-local-49d823e13528536d064d32f7fb84c2f13448db21.tar.xz
yt-local-49d823e13528536d064d32f7fb84c2f13448db21.zip
Fix request search when is empty
Diffstat (limited to 'youtube')
-rw-r--r--youtube/search.py2
-rw-r--r--youtube/templates/base.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/youtube/search.py b/youtube/search.py
index f9591fe..33e9251 100644
--- a/youtube/search.py
+++ b/youtube/search.py
@@ -63,7 +63,7 @@ def get_search_json(query, page, autocorrect, sort, filters):
def get_search_page():
query = request.args.get('search_query') or request.args.get('query')
if query is None:
- return flask.render_template('base.html', title='Search')
+ return flask.render_template('home.html', title='Search')
page = request.args.get("page", "1")
autocorrect = int(request.args.get("autocorrect", "1"))
diff --git a/youtube/templates/base.html b/youtube/templates/base.html
index 8a0238a..3a5d9d0 100644
--- a/youtube/templates/base.html
+++ b/youtube/templates/base.html
@@ -22,7 +22,7 @@
</nav>
<form class="form" id="site-search" action="/youtube.com/results">
<input type="search" name="search_query" class="search-box" value="{{ search_box_value }}"
- {{ "autofocus" if request.path == "/" else "" }} placeholder="Type to search...">
+ {{ "autofocus" if request.path == "/" else "" }} required placeholder="Type to search...">
<button type="submit" value="Search" class="search-button">Search</button>
<!-- options -->
<div class="dropdown">