예제 #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")
예제 #4
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
파일: app_stary.py 프로젝트: hyomee/Python
# 구동 스크립트 작성
from helloworld import app
    
if __name__ == "__main__" :
    app.run("192.168.137.2")