Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pine - Mariah and Kayla #14

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Pine - Mariah and Kayla #14

wants to merge 9 commits into from

Conversation

khuddleup
Copy link

No description provided.

Copy link

@jbieniosek jbieniosek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this project! This project is green.

app/routes.py Outdated
"description" : planet.description,
"num_moons" : planet.num_moons
})
return jsonify(planets_response)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

app/routes.py Outdated
}
return jsonify(response)

return 'Planet ID not found', 404

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

app/routes.py Outdated
"description" : planet.description,
"num_moons" : planet.num_moons
}
return jsonify(response)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice helper!

Comment on lines +7 to +8
@planets_bp.route("", methods=["GET"])
def get_planets():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +16 to +17
@planets_bp.route("/<planet_id>", methods=["GET", "PUT", "DELETE"])
def handle_planet(planet_id):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +44 to +45
@planets_bp.route("", methods=["POST"])
def create_new_planet():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice use of try-except

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants