Skip to content

Instantly share code, notes, and snippets.

@Porter97
Created February 3, 2020 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Porter97/975a06fcea50e5c15369e5396ac05bb3 to your computer and use it in GitHub Desktop.
Save Porter97/975a06fcea50e5c15369e5396ac05bb3 to your computer and use it in GitHub Desktop.
##...
from ..models import User
@main.route('/')
def index():
return render_template('index.html')
@main.route('/user/<username>')
def user(username):
user = User.query.filter_by(username=username).first_or_404()
return render_template('user.html', user=user)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment