This repository was archived by the owner on Feb 3, 2024. It is now read-only.
Add Random Quote Route#66
Merged
jabbate19 merged 5 commits intoComputerScienceHouse:masterfrom Jun 15, 2022
Merged
Conversation
Added /random route which will provide a non-hidden quote selected at random from the database.
mxmeinhold
reviewed
Nov 23, 2021
quotefault/__init__.py
Outdated
Comment on lines
+381
to
+382
| #quote = get_quote_query(speaker = request.args.get('speaker'), | ||
| # submitter = request.args.get('submitter')).order_by(func.rand()).limit(1).all()[0][0] |
Contributor
There was a problem hiding this comment.
It might be nice to leave the query args on this route, otherwise please remove the comment.
quotefault/mail.py
Outdated
| Send email to eboard/rtp for a new report | ||
| """ | ||
| recipients = ["<eboard@csh.rit.edu>","<rtp@csh.rit.edu>"] | ||
| recipients = ["<eboard@csh.rit.edu>","<active-rtp@csh.rit.edu>"] |
Contributor
There was a problem hiding this comment.
Could you rebase? (or is github just not updated this yet)
Collaborator
Author
There was a problem hiding this comment.
I merged jabbate/master to jabbate/random-quote, so I don't know how git responds to that. I'll rebase it.
Contributor
|
imo, don't mark this as resolving 1, since this doesn't actually implement that. Just mention the issue so anyone working on it has this context |
Collaborator
Author
|
I believe this is good to go now |
mxmeinhold
approved these changes
Mar 31, 2022
| @app.route('/random', methods=['GET']) | ||
| @auth.oidc_auth | ||
| def random_quote(): | ||
| quote = get_quote_query(speaker = request.args.get('speaker'), \ |
Contributor
There was a problem hiding this comment.
you shouldn't need the slash, not within parentheses
Mstrodl
added a commit
to Mstrodl/Quotefault
that referenced
this pull request
Jun 20, 2022
Due to failed rebase of ComputerScienceHouse#66
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds route to flask app to return a random quote in plaintext. This can be integrated into many applications, such as members page, jumpstart, etc
Resolves #2
#1 Could use this