Skip to content

Conversation

@drakeredwind01
Copy link
Member

@drakeredwind01 drakeredwind01 commented Sep 3, 2025

Fixes #48

What changes did you make?

  • Added Accomplishment model with proper fields and relationships
  • Added API endpoints with serializers, views, and URL routing
  • Added Django admin registration for the new model
  • Implemented comprehensive test coverage utilizing test fixtures
  • Made database migration

Why did you make the changes (we will use this info to test)?

  • To implement the Accomplishment model as specified in issue Create Table: Accomplishment #48
  • To provide REST API endpoints for managing Accomplishment records
  • To ensure proper integration with the existing codebase
  • To maintain code quality with comprehensive test coverage

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:

File Changes
app/core/models.py Added Accomplishment model
app/core/api/serializers.py Added AccomplishmentSerializer
app/core/api/views.py Added AccomplishmentViewSet
app/core/api/urls.py Added accomplishments URL routing
app/core/admin.py Added admin registration
app/core/tests/test_api.py Added test function
app/core/tests/conftest.py Added Accomplishment fixture
app/core/migrations/0039_accomplishment.py Created migration

Reference:

@drakeredwind01 drakeredwind01 mentioned this pull request Sep 3, 2025
18 tasks
@fyliu fyliu moved this to PR Needs review (automated column, do not place items here manually) in P: PD: Project Board Sep 3, 2025
@fyliu fyliu requested a review from dmartin4820 September 5, 2025 01:12
Copy link
Member

@dmartin4820 dmartin4820 left a 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.

@github-project-automation github-project-automation bot moved this from PR Needs review (automated column, do not place items here manually) to PR changes requested in P: PD: Project Board Sep 8, 2025
@dmartin4820 dmartin4820 self-requested a review September 16, 2025 01:19
Copy link
Member

@dmartin4820 dmartin4820 left a 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

Copy link
Member

@dmartin4820 dmartin4820 left a 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.

@drakeredwind01 drakeredwind01 force-pushed the Feature/48-drakeredwind01-accomplishment branch from 6431410 to efad993 Compare November 21, 2025 02:42
@dmartin4820 dmartin4820 self-requested a review November 24, 2025 01:58
@dmartin4820 dmartin4820 requested a review from fyliu November 24, 2025 02:09
@drakeredwind01
Copy link
Member Author

addressed all issues

  • 'app/core/models.py' - Enhanced model with full documentation
  • 'app/core/models.py' - Restored created_at and updated_at to AbstractBaseModel
  • 'app/core/api/serializers.py' - Added updated_at field
  • 'app/core/migrations/0043_accomplishment.py' - New migration (correct sequence)
  • 'app/core/migrations/max_migration.txt' - Updated to 0043
  • 'app/core/migrations/0039_accomplishment.py' - Will be deleted
  • 'TODO.md' - Will be deleted

I trust everything is finally in order. i hope.

@fyliu fyliu force-pushed the Feature/48-drakeredwind01-accomplishment branch 3 times, most recently from 96f4943 to c32d8ed Compare January 17, 2026 05:38
Copy link
Member

@fyliu fyliu left a 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
Copy link
Member

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.

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.
Copy link
Member

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.

Comment on lines 541 to 544
indexes = [
models.Index(fields=["project"], name="core_accomp_project_idx"),
models.Index(fields=["accomplished_on"], name="core_accomp_date_idx"),
]
Copy link
Member

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.

fyliu
fyliu previously requested changes Jan 23, 2026
Copy link
Member

@fyliu fyliu left a 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.

@fyliu
Copy link
Member

fyliu commented Jan 25, 2026

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.

@fyliu fyliu force-pushed the Feature/48-drakeredwind01-accomplishment branch from 16f3d99 to 061e6a2 Compare January 25, 2026 17:32
@fyliu
Copy link
Member

fyliu commented Jan 25, 2026

I squashed the PR's commits into one and combined the migrations. The branch is still behind main so I'll need to rebase it.

@fyliu fyliu force-pushed the Feature/48-drakeredwind01-accomplishment branch from 061e6a2 to 58af063 Compare January 25, 2026 17:49
@fyliu
Copy link
Member

fyliu commented Jan 25, 2026

I did the rebase and resolved trivial conflicts.

@fyliu fyliu dismissed their stale review January 25, 2026 17:51

The requested items were all completed and tests are passing.

Copy link
Member

@fyliu fyliu left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks!

@github-project-automation github-project-automation bot moved this from PR changes requested to 🔖PR ready to merge in P: PD: Project Board Jan 25, 2026
@fyliu fyliu merged commit ef2e97b into main Jan 25, 2026
2 checks passed
@fyliu fyliu deleted the Feature/48-drakeredwind01-accomplishment branch January 25, 2026 17:53
@github-project-automation github-project-automation bot moved this from 🔖PR ready to merge to ✅Done in P: PD: Project Board Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

Create Table: Accomplishment

4 participants