From a5071cfacd22a3c3ddadd47ebe17fe2d070c8349 Mon Sep 17 00:00:00 2001 From: Oleg Podsadny Date: Sun, 9 Jun 2013 23:49:41 +0200 Subject: [PATCH] templates moved --- pytest_bdd_example/auth/blueprint.py | 2 +- pytest_bdd_example/auth/views.py | 2 +- pytest_bdd_example/dashboard/app.py | 1 + pytest_bdd_example/templates/dashboard/{ => auth}/login.html | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename pytest_bdd_example/templates/dashboard/{ => auth}/login.html (100%) diff --git a/pytest_bdd_example/auth/blueprint.py b/pytest_bdd_example/auth/blueprint.py index 9fe4c43..7e2b144 100644 --- a/pytest_bdd_example/auth/blueprint.py +++ b/pytest_bdd_example/auth/blueprint.py @@ -3,7 +3,7 @@ from flask import Blueprint from .manager import login_manager, check_valid_login from .models import db -auth = Blueprint('auth', __name__, template_folder='auth') +auth = Blueprint('auth', __name__, template_folder='../') @auth.record_once diff --git a/pytest_bdd_example/auth/views.py b/pytest_bdd_example/auth/views.py index 6fba778..4c90f15 100644 --- a/pytest_bdd_example/auth/views.py +++ b/pytest_bdd_example/auth/views.py @@ -18,6 +18,6 @@ def login(): return redirect(request.args.get('next') or url_for('index')) return render_template( - 'login.html', + 'auth/login.html', form=form, ) diff --git a/pytest_bdd_example/dashboard/app.py b/pytest_bdd_example/dashboard/app.py index 83c89ea..a5fdacb 100644 --- a/pytest_bdd_example/dashboard/app.py +++ b/pytest_bdd_example/dashboard/app.py @@ -1,3 +1,4 @@ +import os from flask import Flask from pytest_bdd_example.dashboard import settings diff --git a/pytest_bdd_example/templates/dashboard/login.html b/pytest_bdd_example/templates/dashboard/auth/login.html similarity index 100% rename from pytest_bdd_example/templates/dashboard/login.html rename to pytest_bdd_example/templates/dashboard/auth/login.html