示例#1
0
from helloworld import app

if __name__ == "__name__":
    app.run(host="0.0.0.0")
示例#2
0
from helloworld import app

if __name__ == “__main__”:
    app.run(host=“0.0.0.0”)
示例#3
0
__author__ = 'Chulpyo'

from helloworld import app

if __name__ == "__main__":
    app.run(host="0.0.0.0")
        email = form.email.data
        message = form.message.data
        new_contact_message = ContactMessage(name=name,email=email,message=message)
        db.session.add(new_contact_message)
        db.session.commit()
        flash("Thanks you '<b>{}</b>' <br> Your message has been succesfully submited".format(name))
        return redirect(url_for('index'))
    return render_template('contact.html',form=form)

@app.route('/messages/<int:post_id>')
@app.route('/messages')
#@login_required
def messages(post_id=0):    
    post_id = request.args.get('post_id') if request.args.get('post_id') else post_id
    print post_id 
    if post_id==0:        
        return render_template('messages.html',messages=ContactMessage.query.limit(10))
    else:
        return render_template('messages.html',messages=ContactMessage.query.filter_by(id=post_id).limit(10))

@app.errorhandler(404)
def page_not_found(e):
    return render_template('404.html'), 404

@app.errorhandler(500)
def server_error(e):
    return render_template('500.html'), 500

if __name__ == '__main__':
    app.run(debug=True)
示例#5
0
#!/env/bin/python
from helloworld import app
app.run(host = '0.0.0.0',
        port = 8080)
示例#6
0
# 구동 스크립트 작성
from helloworld import app

if __name__ == "__main__":
    app.run("192.168.137.2")
示例#7
0
from helloworld import app

if __name__ == "__main__":
    app.run()
示例#8
0
from helloworld import app

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=80)
示例#9
0
from helloworld import app as application

if __name__ == "__main__":
    application.run()
示例#10
0
from helloworld import app

if __name__ == "__main__":
	app.run(host="localhost", port=8080, debug=True)
示例#11
0
文件: app.py 项目: agapeuni/python
from helloworld import app


if __name__ == "__main__":
    app.run(host="0.0.0.0", debug=True, port=8000)
示例#12
0
from helloworld import app

if __name__ == "__main__":
    app.run(host='0.0.0.0')
示例#13
0
from helloworld import app

if __name__ == "__main__":
    app.run(host="0.0.0.0", port="8080")
示例#14
0
# 구동 스크립트 작성
from helloworld import app
    
if __name__ == "__main__" :
    app.run("192.168.137.2")