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.

14 lines
348 B

  1. from flask import render_template
  2. from . import main
  3. from ..models import User
  4. @main.route('/', methods=['GET', 'POST'])
  5. def index():
  6. return render_template('index.html')
  7. @main.route('/user/<username>')
  8. def user(username):
  9. user = User.query.filter_by(username=username).first_or_404()
  10. return render_template('user.html', user=user)