diff options
-rw-r--r-- | youtube/__init__.py | 1 | ||||
-rw-r--r-- | youtube/templates/base.html | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/youtube/__init__.py b/youtube/__init__.py index 6c2ec48..9038634 100644 --- a/youtube/__init__.py +++ b/youtube/__init__.py @@ -5,6 +5,7 @@ import traceback import re from sys import exc_info yt_app = flask.Flask(__name__) +yt_app.config['TEMPLATES_AUTO_RELOAD'] = True yt_app.url_map.strict_slashes = False diff --git a/youtube/templates/base.html b/youtube/templates/base.html index 4ff83c5..44aef20 100644 --- a/youtube/templates/base.html +++ b/youtube/templates/base.html @@ -19,7 +19,8 @@ <header> <a href="/youtube.com" id="home-link">Home</a> <form id="site-search" action="/youtube.com/search"> - <input type="search" name="query" class="search-box" value="{{ search_box_value }}"> + <input type="search" name="query" class="search-box" value="{{ search_box_value }}" + {{ "autofocus" if request.path == "/" else "" }}> <button type="submit" value="Search" class="search-button">Search</button> <div class="dropdown"> <button class="dropdown-label">Options</button> |