-
-
Save LairdStreak/5332482bf660e55eaba90bc9be035b21 to your computer and use it in GitHub Desktop.
Multiple Flask URL routes on a single method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@course.route('/courses/<slug>_<id>/print/') | |
@course.route('/courses/<slug>_<id>/') | |
def show_course(slug=None, id=None): | |
# how do I know whether /print was used, or just normal? | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment