-
-
Notifications
You must be signed in to change notification settings - Fork 32
Add Accomplishment model and API endpoints for Feature #48 #530
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
Conversation
dmartin4820
left a comment
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.
The only thing still missing that I can tell is a test for the new accomplishment model.
Attaching a link to the tutorial I normally follow as a checklist of things to do.
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.
re-requesting. hit the request review accidentally
ab51173 to
1637d67
Compare
dmartin4820
left a comment
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.
Major comments that need to be resolved before anything else.
6431410 to
efad993
Compare
|
addressed all issues
I trust everything is finally in order. i hope. |
96f4943 to
c32d8ed
Compare
fyliu
left a comment
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.
Thanks for the PR!
I squashed the commits and combined the migrations. I had to do that in order to rebase it to hackforla/main.
I found some small issues in the comments that you should fix. Please message me or reply to the comments if you need anything.
.gitignore
Outdated
| *.pyc | ||
|
|
||
| .vscode | ||
| TODO.md |
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.
This looks you have a local file to ignore. It shouldn't be committed to the project though.
You can move this line to .git/info/exclude so it applies only to your local repo.
app/core/models.py
Outdated
| class AbstractBaseModel(models.Model): | ||
| """ | ||
| Base abstract model, that has `uuid` instead of `id` and included `created_at`, `updated_at` fields. | ||
| Base abstract model, that has `uuid` instead of `id` fields. |
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.
These lines shouldn't be changed since it's not part of the issue.
app/core/models.py
Outdated
| indexes = [ | ||
| models.Index(fields=["project"], name="core_accomp_project_idx"), | ||
| models.Index(fields=["accomplished_on"], name="core_accomp_date_idx"), | ||
| ] |
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.
It's not necessary to add these indexes. Django already adds some default ones that overlap these.
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.
Thanks for the PR!
I found a few issues that you should fix. Thanks!
Also, you should add a test in test_models.py . It's not very interesting, but it's good to develop the habit of writing tests.
|
I pushed commits for autoformat and new migration for the latest change. I'm not sure why Github didn't add the formatting commit automatically like it should've. |
16f3d99 to
061e6a2
Compare
|
I squashed the PR's commits into one and combined the migrations. The branch is still behind |
061e6a2 to
58af063
Compare
|
I did the rebase and resolved trivial conflicts. |
The requested items were all completed and tests are passing.
fyliu
left a comment
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.
Looks great. Thanks!
Fixes #48
What changes did you make?
Why did you make the changes (we will use this info to test)?
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
N/A (No visual changes, backend implementation only)
Visuals after changes are applied
N/A (No visual changes, backend implementation only)
Files Modified/Added:
app/core/api/serializers.pyapp/core/api/views.pyapp/core/api/urls.pyapp/core/admin.pyapp/core/tests/test_api.pyapp/core/migrations/0039_accomplishment.pyReference: