diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/public/views.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/public/views.py index e7909bd..b291370 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/public/views.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/public/views.py @@ -9,9 +9,7 @@ from {{cookiecutter.repo_name}}.public.forms import RegisterForm, LoginForm from {{cookiecutter.repo_name}}.utils import flash_errors from {{cookiecutter.repo_name}}.database import db -blueprint = Blueprint('public', __name__, - static_folder="../static", - template_folder="../templates") +blueprint = Blueprint('public', __name__, static_folder="../static") @blueprint.route("/", methods=["GET", "POST"]) @@ -27,7 +25,7 @@ def home(): session['username'] = u.username flash("You are logged in.", 'success') return redirect(url_for("user.members")) - return render_template("home.html", form=form) + return render_template("public/home.html", form=form) @blueprint.route('/logout/') def logout(): @@ -50,7 +48,7 @@ def register(): flash("That username and/or email already exists. Try again.", 'warning') else: flash_errors(form) - return render_template('register.html', form=form) + return render_template('public/register.html', form=form) @blueprint.route("/about/") def about(): diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/about.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/public/about.html similarity index 100% rename from {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/about.html rename to {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/public/about.html diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/home.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/public/home.html similarity index 100% rename from {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/home.html rename to {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/public/home.html diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/register.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/public/register.html similarity index 100% rename from {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/register.html rename to {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/public/register.html diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/user/views.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/user/views.py index faab7a6..b738d08 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/user/views.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/user/views.py @@ -3,7 +3,8 @@ from flask import Blueprint, render_template from {{cookiecutter.repo_name}}.utils import login_required -blueprint = Blueprint("user", __name__, url_prefix='/users') +blueprint = Blueprint("user", __name__, url_prefix='/users', + static_folder="../static") @blueprint.route("/")