You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
489 B

  1. from flask import Flask, render_template
  2. from flask_bootstrap import Bootstrap
  3. app = Flask(__name__)
  4. bootstrap = Bootstrap(app)
  5. @app.errorhandler(404)
  6. def page_not_found(e):
  7. return render_template('404.html'), 404
  8. @app.errorhandler(500)
  9. def internal_server_error(e):
  10. return render_template('500.html'), 500
  11. @app.route('/')
  12. def index():
  13. return render_template('index.html')
  14. @app.route('/user/<name>')
  15. def user(name):
  16. return render_template('user.html', name=name)