from helloworld import app if __name__ == "__name__": app.run(host="0.0.0.0")
from helloworld import app if __name__ == “__main__”: app.run(host=“0.0.0.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)
#!/env/bin/python from helloworld import app app.run(host = '0.0.0.0', port = 8080)
# 구동 스크립트 작성 from helloworld import app if __name__ == "__main__": app.run("192.168.137.2")
from helloworld import app if __name__ == "__main__": app.run()
from helloworld import app if __name__ == "__main__": app.run(host="0.0.0.0", port=80)
from helloworld import app as application if __name__ == "__main__": application.run()
from helloworld import app if __name__ == "__main__": app.run(host="localhost", port=8080, debug=True)
from helloworld import app if __name__ == "__main__": app.run(host="0.0.0.0", debug=True, port=8000)
from helloworld import app if __name__ == "__main__": app.run(host='0.0.0.0')
from helloworld import app if __name__ == "__main__": app.run(host="0.0.0.0", port="8080")
# 구동 스크립트 작성 from helloworld import app if __name__ == "__main__" : app.run("192.168.137.2")