diff --git a/Large-app-how-to.md b/Large-app-how-to.md index e9e96a7..59e223b 100644 --- a/Large-app-how-to.md +++ b/Large-app-how-to.md @@ -231,3 +231,25 @@ The view is where we'll declare our Blueprint. Using url_prefix will prefix ever return redirect(url_for('user.home')) return render_template("users/register.html", form=form) +## First template + +## Settings up the app + +Here is the `/app/__init__.py` + + + from flask import Flask, render_template + from flaskext.sqlalchemy import SQLAlchemy + + app = Flask(__name__) + app.config.from_object('config') + + db = SQLAlchemy(app) + + @app.errorhandler(404) + def not_found(error): + return render_template('404.html'), 404 + + from app.users.views import mod as usersModule + + app.register_blueprint(usersModule)