Skip to content

Ocelots - Soumya S and Kelly T#3

Open
kellytate wants to merge 39 commits intoada-ac2:mainfrom
kellytate:main
Open

Ocelots - Soumya S and Kelly T#3
kellytate wants to merge 39 commits intoada-ac2:mainfrom
kellytate:main

Conversation

@kellytate
Copy link
Copy Markdown

@kellytate kellytate commented Dec 17, 2022

No description provided.

kellytate and others added 30 commits December 14, 2022 14:00
Co-authored-by: Soumya Sah <smysh@users.noreply.github.com>
…TABASE solar_system_development; in the postgres user before further development and testing.
Comment thread app/planet_routes.py
try:
model_id = int(model_id)
except:
abort(make_response({"message":f"{cls.__name__} {model_id} invalid"}, 400))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice use of introspection here :)

Comment thread app/planet_routes.py

name_query = request.args.get("name")
if name_query:
planet_query = planet_query.filter(Planet.name.ilike(f"%{name_query}%"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice use of SQLAlchemy's case-insensitive searching

Comment thread app/planet_seed.sql
@@ -0,0 +1,13 @@
ALTER SEQUENCE planet_id_seq RESTART WITH 1;
ALTER SEQUENCE moon_id_seq RESTART WITH 1;
INSERT INTO planet VALUES (DEFAULT,'Mercury', 'Mercury is the closest planet to the Sun.', 88, 0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This file is great to see here!

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.

3 participants