✨(backend) admin api offering deeplink viewset and serializers#1276
Open
jonathanreveille wants to merge 4 commits intofeat/add_deep_link_to_my_cpffrom
Open
Conversation
07597e7 to
6362cf0
Compare
573bcf9 to
2a6b878
Compare
6362cf0 to
38e00a8
Compare
ceb0b02 to
4881dd7
Compare
14462fa to
c91c344
Compare
12f66d3 to
89fc9c9
Compare
c91c344 to
2173e96
Compare
89fc9c9 to
2cd4652
Compare
2173e96 to
6d690b4
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds admin API functionality for managing deep links associated with course offerings in the Joanie backend. Deep links allow learners to subscribe to courses through external platforms (e.g., Mon Compte Formation in France). The implementation includes a nested viewset for full CRUD operations on offering deep links, a toggle endpoint to activate/deactivate all deep links for an offering, and comprehensive test coverage.
Changes:
- Added
NestedOfferingDeepLinkViewSetwith CRUD operations for managing offering deep links via admin API - Implemented
toggle_deeplinksaction onOfferingViewSetto bulk activate/deactivate deep links - Added model methods:
toggle_deeplinks()on CourseProductRelation and customdelete()on OfferingDeepLink with validation - Created
AdminOfferingDeepLinkSerializerfor API data serialization
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/backend/joanie/core/api/admin/init.py | Added NestedOfferingDeepLinkViewSet with CRUD methods and toggle_deeplinks action on OfferingViewSet |
| src/backend/joanie/core/serializers/admin.py | Added AdminOfferingDeepLinkSerializer with custom representation method |
| src/backend/joanie/core/models/courses.py | Added toggle_deeplinks method and custom delete validation |
| src/backend/joanie/admin_urls.py | Registered offering-deeplinks nested routes |
| src/backend/joanie/tests/swagger/admin-swagger.json | Added OpenAPI spec for new endpoints |
| src/backend/joanie/tests/core/api/admin/offerings/test_toggle_deeplinks.py | Comprehensive tests for toggle deeplinks endpoint |
| src/backend/joanie/tests/core/api/admin/offering_deeplinks/*.py | Full test suite for CRUD operations (create, retrieve, list, update, delete) |
| src/backend/joanie/tests/core/api/admin/offering_deeplinks/init.py | Package initialization file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/backend/joanie/tests/core/api/admin/offerings/test_toggle_deeplinks.py
Outdated
Show resolved
Hide resolved
src/backend/joanie/tests/core/api/admin/offerings/test_activate_deeplinks.py
Show resolved
Hide resolved
src/backend/joanie/tests/core/api/admin/offering_deeplinks/test_update.py
Outdated
Show resolved
Hide resolved
kernicPanel
reviewed
Feb 9, 2026
18821b2 to
a16f217
Compare
We want admin backoffice users to be able to manage deep links of an offering for organizations.
We want admin authenticated user to be able to toggle on or off the deep links of an offering. This will allow them to activate or desactivate the possibility to redirect the learners to the external platform to make subscriptions.
0957419 to
1241e29
Compare
1241e29 to
26cba34
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
We want admin authenticated user to be able to manage deep links of an offering for the related organizations.
We also added a new endpoint in the
OfferingViewSetto activate the deep links when needed.Proposal
NestedOfferingDeepLinkViewSet( CRUD ) and serializerOfferingViewSet