From 17282af304c8370da22d10f08e38d6b452528b1b Mon Sep 17 00:00:00 2001 From: Mike Shoup Date: Fri, 28 Jun 2019 11:24:25 -0600 Subject: [PATCH] Redirect home to recipes index --- src/humulus/home.py | 4 ++-- tests/test_home.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/humulus/home.py b/src/humulus/home.py index 3e4242a..ccbec62 100644 --- a/src/humulus/home.py +++ b/src/humulus/home.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from flask import Blueprint, render_template +from flask import Blueprint, redirect, url_for bp = Blueprint('home', __name__) @@ -22,4 +22,4 @@ bp = Blueprint('home', __name__) @bp.route('/') def index(): """Renders the homepage template""" - return render_template('index.html') + return redirect(url_for('recipes.index')) diff --git a/tests/test_home.py b/tests/test_home.py index aff7e50..c03f6ba 100644 --- a/tests/test_home.py +++ b/tests/test_home.py @@ -15,4 +15,4 @@ def test_home(client): response = client.get('/') - assert b'Home' in response.data + assert response.status_code == 302