Updated Large app how to (markdown)
parent
c2955a3d83
commit
9c94062572
1 changed files with 22 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue