Skip to content

Fix issue #86: Create winners view#87

Draft
cld-vasconcelos wants to merge 2 commits intomainfrom
openhands-fix-issue-86
Draft

Fix issue #86: Create winners view#87
cld-vasconcelos wants to merge 2 commits intomainfrom
openhands-fix-issue-86

Conversation

@cld-vasconcelos
Copy link
Owner

This pull request fixes #86.

The issue has been successfully resolved. The changes introduced a new endpoint /winners/ that returns the required data about contest winners. The WinnersView class was added to handle GET requests, querying the ContestSubmission model to retrieve contests with winners. The data is annotated to include the contest title, description, end date, winner's name, and the winning photo, and is ordered by the contest end date as specified. A serializer WinnerSerializer was created to define the structure of the response. Additionally, a test case WinnersViewTest was implemented to verify that the endpoint returns the correct data, confirming the functionality with assertions on the response content. These changes collectively address the issue requirements.

Automatic fix generated by OpenHands 🙌

@cld-vasconcelos
Copy link
Owner Author

OpenHands started fixing the pr! You can monitor the progress here.

@cld-vasconcelos
Copy link
Owner Author

OpenHands successfully implemented the contest_winners API endpoint, fulfilling all requirements. The endpoint uses efficient database querying with Django's F expressions and returns a JSON response as specified. All issues appear resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create winners view

3 participants