示例#1
0
from intro_to_flask import app

app.run(host='0.0.0.0', debug=True)
示例#2
0
文件: runserver.py 项目: jjbull/test
from intro_to_flask import app 

app.run('0.0.0.0', 8888,debug=True)
示例#3
0
from intro_to_flask import app
 
app.run(debug=True)
from intro_to_flask import app

app.run(debug=True,use_reloader=True )
示例#5
0
    return render_template('home.html')


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


@app.route('/contact', methods=['GET', 'POST'])
def contact():
    form = ContactForm(request.form)

    if request.method == 'POST' and form.validate():
        msg = Message(form.subject.data,
                      sender='*****@*****.**',
                      recipients=['*****@*****.**'])
        msg.body = """
    From: %s <%s>
    %s
    """ % (form.name.data, form.email.data, form.message.data)
        mail.send(msg)

        return render_template('contact.html', success=True)
    else:
        print form.data
        return render_template('contact.html', form=form)


if __name__ == '__main__':
    app.run(debug=True)
示例#6
0
import os
from intro_to_flask import app

port = int(os.environ.get("PORT", 5000))
app.run(debug=True, host='0.0.0.0', port=port)


示例#7
0
#if __name__ == '__main__':
from intro_to_flask import app

app.run(debug=True,host='0.0.0.0',port=9999)
示例#8
0
import os
from intro_to_flask import app

port = int(os.environ.get("PORT", 3002))
app.run(debug=True, host='0.0.0.0', port=port)