-
Notifications
You must be signed in to change notification settings - Fork 0
Liraisokay issues 50 57 #58
base: dev
Are you sure you want to change the base?
Conversation
dropzone removed, since form can be done without it and it complicates things
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
#50:
Usage of inheritance was unjustified and class methods were invoked in the route handlers.
#51:
#52:
#53
#54:
#55:
#56
#57