Pine - Mariah and Kayla#14
Open
khuddleup wants to merge 9 commits into
Open
Conversation
jbieniosek
reviewed
Oct 21, 2021
jbieniosek
left a comment
There was a problem hiding this comment.
Great work on this project! This project is green.
| "description" : planet.description, | ||
| "num_moons" : planet.num_moons | ||
| }) | ||
| return jsonify(planets_response) |
| } | ||
| return jsonify(response) | ||
|
|
||
| return 'Planet ID not found', 404 |
| "description" : planet.description, | ||
| "num_moons" : planet.num_moons | ||
| } | ||
| return jsonify(response) |
…atabase and refactors get_planets and get_planet routes accordingly
CheezItMan
reviewed
Oct 29, 2021
CheezItMan
left a comment
There was a problem hiding this comment.
Nice work Y'all, you hit the learning goals here. Well done. I left a few comments, but this is pretty solid.
| db = SQLAlchemy() | ||
| migrate = Migrate() | ||
|
|
||
| DATABASE_CONNECTION_STRING = 'postgresql+psycopg2://postgres:postgres@localhost:5432/solar_system_development' |
There was a problem hiding this comment.
I suggest that you should use an environment variable for the connection string instead of leaving the string hard-coded here in the __init__.py file.
| description = db.Column(db.String(64)) | ||
| num_moons = db.Column(db.Integer) | ||
|
|
||
| def to_dict(self): |
Comment on lines
+7
to
+8
| @planets_bp.route("", methods=["GET"]) | ||
| def get_planets(): |
Comment on lines
+16
to
+17
| @planets_bp.route("/<planet_id>", methods=["GET", "PUT", "DELETE"]) | ||
| def handle_planet(planet_id): |
Comment on lines
+44
to
+45
| @planets_bp.route("", methods=["POST"]) | ||
| def create_new_planet(): |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.