Exemplo n.º 1
0
def create_app():
    app = Flask(__name__)

    views.configure(app)

    db.configure(app)

    app.config['SECRET_KEY'] = 'dev'

    return app
Exemplo n.º 2
0
def create_app():
    app = Flask(__name__)

    basedir = os.path.abspath(os.path.dirname(__file__))
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(
        basedir, 'data.sqlite')
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False

    db.init_app(app)

    views.configure(app)

    return app
Exemplo n.º 3
0
def create_app():
    app = Flask(
        __name__
    )  #templates folder sao html e statics javascript/css etc.. se nao informar nada ele pega o nome padrao

    db.configure(app)

    views.configure(app)

    #admin.configure(app)
    #configurar funçoes
    #contact.configure(app)
    #variaveis
    app.config['SECRET_KEY'] = 'HSUAHSUHAFUUHDHA'
    return app
Exemplo n.º 4
0
def create_app():
    app = Flask(__name__)

    # configurar extensoes
    db.configure(app)

    views.configure(app)

    admin.configure(app)

    contact.configure(app)

    # configurar variaveis
    app.config['SECRET_KEY'] = 'secret'
    return app
Exemplo n.º 5
0
def create_app():
    app = Flask(__name__)

    # configurar extensoes
    db.configure(app)

    views.configure(app)

    contact.configure(app)

    admin.configure(app)

    # configurar variaveis
    app.config['SECRET_KEY'] = 'dhuoel3nbjfop9dh@fmsdkfsml1'

    return app
Exemplo n.º 6
0
def create_app():
    app = Flask(__name__, static_folder="static", template_folder="frontend")

    # Extensions
    db.configure(app)
    views.configure(app)

    admin.configure(app)

    # Blueprint app example
    contact.configure(app)

    # Configurar variaveis
    app.config["SECRET_KEY"] = "skdalksdjsalkjdlkajsdlkajlks"

    return app
def create_app():
    """Function ?."""
    # app = Flask(__name__, template_folder='/template/bar.html', static_folder='/static')
    app = Flask(__name__)

    db.configure(app)

    views.configure(app)
    
    # configurar extensões
    contact.configure(app)

    # Flask Admin
    admin.configure(app)

    # configurar as variáveis
    app.config['SECRET_KEY'] = 'kdjlkhgslskglg'
    return app
Exemplo n.º 8
0
def create_app():
    """Classe Inicial """
    app = Flask(__name__)
    views.configure(app)
    criar_tabelas(app)
    return app
Exemplo n.º 9
0
def create_app():
    app = Flask(__name__)
    views.configure(app)
    contract.configure(app)
    return app
Exemplo n.º 10
0
def createApp():
    app = Flask(__name__)
    views.configure(app)
    return app