Пример #1
0
#this is the startup and config of the app

from flask import Flask
from _init_ import app

if __name__ == "__main__":
    app.run(ssl_context='adhoc')
Пример #2
0
from _init_ import app
app.run(debug=True)
Пример #3
0
from _init_ import app


@app.route('/')
def hello_world():
    return 'Hello Flask!'


if __name__ == '__main__':
    app.debug = app.config['DEBUG']
    app.run(host='0.0.0.0', port='5001')
Пример #4
0

@app.route('/index')
def index1():
    return redirect(url_for('index'))


@app.route('/category')
def category():
    return render_template('category.html')


@app.route('/artice')
def artice1():
    return redirect(url_for('artice'))


@app.route('/login')
def login():
    return render_template('login.html')


@app.route('/information')
def information():
    return render_template('information.html')


if __name__ == '__main__':
    app.debug = app.config['DEBUG']
    app.run(host='127.0.0.1', port=8888)
Пример #5
0
from _init_ import app


@app.route('/')
def hello_world():
    return 'Hello Flask!'


if __name__ == '__main__':
    app.debug = app.config['DEBUG']
    app.run(host='0.0.0.0')