forked from AdaGold/task-list-api
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Zoisite - Jessica #111
Open
Yiskah-S
wants to merge
55
commits into
Ada-C19:main
Choose a base branch
from
Yiskah-S:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Zoisite - Jessica #111
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
9f1f307
Install blinker, update req, get tests to fail, setup pseudo for rout…
Yiskah-S 8bae664
Wave 1 finish tests
Yiskah-S 24b4649
Fix error in task __init__
Yiskah-S 8ab85f5
Update init file
Yiskah-S 027f85c
Wave 1 post
Yiskah-S 760f751
Post refactored with helper function
Yiskah-S 3401e24
wave 1 GET all tasks
Yiskah-S e178d82
Make test file more clear to work with
Yiskah-S ebd9099
Wave 1 finish get, 400, 404, helper functions for those
Yiskah-S 701a605
Wave 1 update task
Yiskah-S 2e247b0
Fix 400 tests messages
Yiskah-S a308743
Wave 1 completed
Yiskah-S f66ec25
Wave 2
Yiskah-S 0bf3230
Halway through wave 3
Yiskah-S 2850bf3
wave 3
Yiskah-S a7a4e36
fixed tests
Yiskah-S d6b86ee
wave 5
Yiskah-S fd2d664
Fix wave 5 tests
Yiskah-S 44d07b9
testig if it was a venv issue
Yiskah-S afb8746
Refactored into files
Yiskah-S bc23c70
wave 4
Yiskah-S 9e76ca5
refactor
Yiskah-S aac180f
refactor main paths
Yiskah-S aeee95c
Finished refactor for wave 1 and 5
Yiskah-S 5fcbb3a
wave 2
Yiskah-S 8e9d915
wave 2 refactored and tests and functionality added
Yiskah-S 2fe3ae1
wave 1, 2, 3, 5 refactored fully
Yiskah-S edb818d
wave 4
Yiskah-S 2428d90
Wave 6
Yiskah-S 560254e
wave 6 refactored
Yiskah-S 1342834
Polishing and minor changes
Yiskah-S 888593b
Add additional tests
Yiskah-S 594cf30
minor clean up
Yiskah-S 39fa058
fix tests
Yiskah-S 87aacc6
Fixed Postman
Yiskah-S 64190e2
Render setup
Yiskah-S 323be5b
fixed init file
Yiskah-S 430613d
new db migrate
Yiskah-S 5813ecb
fix
Yiskah-S 31d5941
omg
Yiskah-S ff9a4be
try again to get Render to work
Yiskah-S 8291d75
fix requirements
Yiskah-S 5e31dd0
Upgraded software
Yiskah-S e96c3a3
Changed requirements again
Yiskah-S 13f568b
Change requirements
Yiskah-S a25a20c
req
Yiskah-S 89a0d72
req
Yiskah-S fbaac96
db upgrade
Yiskah-S 59d0de6
test jsonify
Yiskah-S 55dd1b3
add jsonify
Yiskah-S 98817fb
fix typo
Yiskah-S 0334941
fix bracket error
Yiskah-S 0dc5c41
rollback some stuff
Yiskah-S 81afc19
try get
Yiskah-S 41eef03
clean up code
Yiskah-S File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,3 +183,6 @@ and get this response: | |
``` | ||
|
||
so that I know I did not create a Goal that is saved in the database. | ||
|
||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
from app import db | ||
|
||
|
||
class Goal(db.Model): | ||
goal_id = db.Column(db.Integer, primary_key=True) | ||
__tablename__ = 'goals' | ||
|
||
goal_id = db.Column(db.Integer, primary_key=True, autoincrement=True) | ||
title = db.Column(db.String, nullable=False) | ||
tasks = db.relationship("Task", back_populates="goal") | ||
|
||
|
||
def to_json(self, tasks=False): | ||
goal_dict = { | ||
"id": self.goal_id, | ||
"title": self.title, | ||
} | ||
if tasks: | ||
goal_dict["tasks"] = [task.to_json() for task in self.tasks] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great use of a list comprehension here! |
||
return goal_dict | ||
|
||
@classmethod | ||
def from_json(cls, request_body): | ||
return cls( | ||
title=request_body["title"] | ||
) | ||
|
Oops, something went wrong.
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.
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.
Just a reminder that we should have an empty init.py within our model directory as well!