@@ -59,7 +59,7 @@ class SamplePluginConfig(AppConfig):
5959 " common" : {PluginURLs.RELATIVE_PATH : " settings.common" },
6060 " production" : {PluginURLs.RELATIVE_PATH : " settings.production" },
6161 },
62- # ... CMS configuration
62+ # ... CMS configuration
6363 }
6464 }
6565```
@@ -74,24 +74,21 @@ class SamplePluginConfig(AppConfig):
7474
7575### Entry Points Configuration
7676
77- In [ ` setup.py ` ] ( ./setup.py ) , the plugin registers itself with edx-platform:
77+ In [ ` pyproject.toml ` ] ( ./backend/pyproject.toml ) , the plugin registers itself with edx-platform:
7878
7979``` python
80- entry_points= {
81- " lms.djangoapp" : [
82- " sample_plugin = sample_plugin.apps:SamplePluginConfig" ,
83- ],
84- " cms.djangoapp" : [
85- " sample_plugin = sample_plugin.apps:SamplePluginConfig" ,
86- ],
87- }
80+ [project.entry- points." lms.djangoapp" ]
81+ sample_plugin = " sample_plugin.apps:SamplePluginConfig"
82+
83+ [project.entry- points." cms.djangoapp" ]
84+ sample_plugin = " sample_plugin.apps:SamplePluginConfig"
8885```
8986
9087** Why this works** : The platform automatically discovers and loads any Django app registered in these entry points.
9188
9289## Models & Database
9390
94- ** File** : [ ` sample_plugin/models.py ` ] ( ./sample_plugin/models.py )
91+ ** File** : [ ` sample_plugin/models.py ` ] ( ./sample_plugin/models.py )
9592** Official Docs** : [ OEP-49: Django App Patterns] ( https://docs.openedx.org/projects/openedx-proposals/en/latest/best-practices/oep-0049-django-app-patterns.html )
9693
9794### CourseArchiveStatus Model
@@ -133,7 +130,7 @@ The model includes PII documentation:
133130
134131## API Endpoints
135132
136- ** File** : [ ` sample_plugin/views.py ` ] ( ./sample_plugin/views.py )
133+ ** File** : [ ` sample_plugin/views.py ` ] ( ./sample_plugin/views.py )
137134** URLs** : [ ` sample_plugin/urls.py ` ] ( ./sample_plugin/urls.py )
138135
139136### REST API Implementation
@@ -182,7 +179,7 @@ def perform_create(self, serializer):
182179
183180## Events & Signals
184181
185- ** File** : [ ` sample_plugin/signals.py ` ] ( ./sample_plugin/signals.py )
182+ ** File** : [ ` sample_plugin/signals.py ` ] ( ./sample_plugin/signals.py )
186183** Official Docs** : [ Open edX Events Guide] ( https://docs.openedx.org/projects/openedx-events/en/latest/ )
187184
188185### Event Handler Example
@@ -241,7 +238,7 @@ def ready(self):
241238
242239## Filters & Pipeline Steps
243240
244- ** File** : [ ` sample_plugin/pipeline.py ` ] ( ./sample_plugin/pipeline.py )
241+ ** File** : [ ` sample_plugin/pipeline.py ` ] ( ./sample_plugin/pipeline.py )
245242** Official Docs** : [ Using Open edX Filters] ( https://docs.openedx.org/projects/openedx-filters/en/latest/how-tos/using-filters.html )
246243
247244### Filter Implementation
@@ -254,12 +251,12 @@ class ChangeCourseAboutPageUrl(PipelineStep):
254251 # Extract course ID from URL
255252 pattern = r ' ( ?P<course_id> course-v1:[^ / ]+ ) '
256253 match = re.search(pattern, url)
257-
254+
258255 if match:
259256 course_id = match.group(' course_id' )
260257 new_url = f " https://example.com/new_about_page/ { course_id} "
261258 return {" url" : new_url, " org" : org}
262-
259+
263260 # Return original data if no match
264261 return {" url" : url, " org" : org}
265262```
@@ -278,7 +275,7 @@ class ChangeCourseAboutPageUrl(PipelineStep):
278275
279276** Common Filters:**
280277- Course enrollment filters
281- - Authentication filters
278+ - Authentication filters
282279- Certificate generation filters
283280- Course discovery filters
284281
@@ -289,7 +286,7 @@ Filters must be registered in Django settings. This happens automatically via th
289286### Real-World Use Cases
290287
291288- ** URL Redirection** : Send users to custom course pages
292- - ** Access Control** : Implement custom enrollment restrictions
289+ - ** Access Control** : Implement custom enrollment restrictions
293290- ** Data Transformation** : Modify course data before display
294291- ** Integration** : Add custom fields to API responses
295292
@@ -380,7 +377,7 @@ python manage.py cms migrate
380377
381378### Verification Steps
382379
383- 1 . ** Check Installation** :
380+ 1 . ** Check Installation** :
384381 ``` bash
385382 python manage.py lms shell
386383 >>> from sample_plugin.models import CourseArchiveStatus
@@ -439,7 +436,7 @@ from django.contrib.auth import get_user_model
439436class TestCourseArchiveStatusAPI (APITestCase ):
440437 def setUp (self ):
441438 self .user = get_user_model().objects.create_user(username = " testuser" )
442-
439+
443440 def test_list_archive_statuses (self ):
444441 # Test API endpoints
445442 pass
@@ -492,7 +489,7 @@ Settings configure filter behavior:
492489# settings/common.py
493490def plugin_settings (settings ):
494491 settings.SAMPLE_PLUGIN_REDIRECT_DOMAIN = " custom-domain.com"
495-
492+
496493# pipeline.py - Uses setting
497494class ChangeCourseAboutPageUrl (PipelineStep ):
498495 def run_filter (self , url , org , ** kwargs ):
@@ -506,15 +503,15 @@ class ChangeCourseAboutPageUrl(PipelineStep):
506503### For Your Use Case
507504
5085051 . ** Models** : Modify [ ` models.py ` ] ( ./sample_plugin/models.py ) for your data structure
509- 2 . ** APIs** : Update [ ` views.py ` ] ( ./sample_plugin/views.py ) and [ ` serializers.py ` ] ( ./sample_plugin/serializers.py )
506+ 2 . ** APIs** : Update [ ` views.py ` ] ( ./sample_plugin/views.py ) and [ ` serializers.py ` ] ( ./sample_plugin/serializers.py )
5105073 . ** Events** : Change event handlers in [ ` signals.py ` ] ( ./sample_plugin/signals.py )
5115084 . ** Filters** : Implement your business logic in [ ` pipeline.py ` ] ( ./sample_plugin/pipeline.py )
5125095 . ** Settings** : Configure plugin behavior in [ ` settings/ ` ] ( ./sample_plugin/settings/ )
513510
514511### Plugin Development Checklist
515512
516- - [ ] Update ` setup.py ` with your plugin name and dependencies
517- - [ ] Modify ` apps.py ` with your app configuration
513+ - [ ] Update ` pyproject.toml ` with your plugin name and dependencies
514+ - [ ] Modify ` apps.py ` with your app configuration
518515- [ ] Design your models in ` models.py `
519516- [ ] Create and run database migrations
520517- [ ] Implement API endpoints in ` views.py `
@@ -551,4 +548,4 @@ def handle_your_event(signal, sender, event_data, **kwargs):
551548 pass
552549```
553550
554- This backend plugin provides a solid foundation for any Open edX extension. Focus on adapting the business logic while keeping the proven patterns for authentication, permissions, and integration.
551+ This backend plugin provides a solid foundation for any Open edX extension. Focus on adapting the business logic while keeping the proven patterns for authentication, permissions, and integration.
0 commit comments