July 2018
Intermediate to advanced
324 pages
8h 14m
English
Before diving into a detailed description of each file, let's have a look at the instantiation Flask mechanism. As you already know, we are creating a submodule as an independent module under the root module. Flask introduces the concept of blueprint for making the submodule components under a common pattern.
The Flask blueprint instance is very similar to a Flask instance, but it's not an application object. Instead, it has the ability to construct and extend the parent application. With the help of blueprint, you can design a modular application.
The following is a code snippet of the Blueprint instantiation in the auth/__init__.py file:
from flask import Blueprintauth = Blueprint('auth', __name__)from . import views
As you can ...
Read now
Unlock full access