This repository was archived by the owner on Jan 25, 2020. It is now read-only.
Open
Conversation
dropzone removed, since form can be done without it and it complicates things
mvartanyan
reviewed
Sep 12, 2019
| static = app.config.get('STATIC_ROOT') + f'{self.id}.mp3' | ||
| host = app.config.get('HOST', 'localhost:5000') | ||
| return f'http://{host}/{Path(static).as_posix()}' | ||
| return f"http://{host}{url_for('episodes', path=f'{self.id}.mp3')}" |
There was a problem hiding this comment.
What is happening here? why do we have a mix of quotes and why are we building URLs by concatenating strings?
| def check_database_schema_existence(): | ||
| try: | ||
| test_user_id = 1 | ||
| User.query.get(test_user_id) |
There was a problem hiding this comment.
Is it an appropriate test for the existence of the schema?
| jokes = get_jokes_episodes(length) | ||
| podcast.episodes = [] | ||
| for i in range(length): | ||
| podcast.episodes.append(jokes[i % len(jokes)]) |
There was a problem hiding this comment.
If you have all jokes on the application side, why ask the db machinery come up with randomness and then use remainder to select from randomized? You can simply take a number of jokes and use choice() to get a random one.
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.
#50:
Usage of inheritance was unjustified and class methods were invoked in the route handlers.
#51:
#52:
#53
#54:
#55:
#56
#57