main.py 368 B

1234567891011121314
  1. from flask import request, Flask, render_template
  2. app = Flask(__name__)
  3. @app.route('/', methods=['GET', 'POST'])
  4. def hello_world():
  5. if request.method == 'GET':
  6. return render_template('index.html')
  7. elif request.method == 'POST':
  8. return request.form
  9. @app.errorhandler(405)
  10. def method_not_allowed(e):
  11. return render_template('405.html'), 405