openedx-learning 0.9.4__tar.gz → 0.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. {openedx_learning-0.9.4/openedx_learning.egg-info → openedx_learning-0.10.0}/PKG-INFO +15 -20
  2. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/README.rst +11 -16
  3. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/__init__.py +1 -1
  4. openedx_learning-0.10.0/openedx_learning/api/authoring.py +14 -0
  5. openedx_learning-0.10.0/openedx_learning/api/authoring_models.py +13 -0
  6. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/components/api.py +21 -0
  7. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/components/apps.py +2 -2
  8. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/components/models.py +9 -2
  9. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/contents/api.py +13 -1
  10. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/contents/apps.py +2 -2
  11. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/contents/models.py +7 -2
  12. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/publishing/api.py +35 -7
  13. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/publishing/apps.py +2 -2
  14. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/publishing/model_mixins.py +6 -0
  15. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/publishing/models.py +10 -0
  16. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/contrib/media_server/views.py +1 -1
  17. {openedx_learning-0.9.4 → openedx_learning-0.10.0/openedx_learning.egg-info}/PKG-INFO +15 -20
  18. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning.egg-info/SOURCES.txt +29 -31
  19. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/setup.py +1 -1
  20. openedx_learning-0.9.4/openedx_learning/rest_api/apps.py +0 -14
  21. openedx_learning-0.9.4/openedx_learning/rest_api/urls.py +0 -6
  22. openedx_learning-0.9.4/openedx_learning/rest_api/v1/components.py +0 -30
  23. openedx_learning-0.9.4/openedx_learning/rest_api/v1/urls.py +0 -10
  24. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/CHANGELOG.rst +0 -0
  25. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/LICENSE.txt +0 -0
  26. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/MANIFEST.in +0 -0
  27. {openedx_learning-0.9.4/openedx_learning/contrib → openedx_learning-0.10.0/openedx_learning/api}/__init__.py +0 -0
  28. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps}/__init__.py +0 -0
  29. {openedx_learning-0.9.4/openedx_learning/core/components → openedx_learning-0.10.0/openedx_learning/apps/authoring}/__init__.py +0 -0
  30. {openedx_learning-0.9.4/openedx_learning/core/components/migrations → openedx_learning-0.10.0/openedx_learning/apps/authoring/components}/__init__.py +0 -0
  31. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/components/admin.py +0 -0
  32. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/components/migrations/0001_initial.py +0 -0
  33. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/components/migrations/0002_alter_componentversioncontent_key.py +0 -0
  34. {openedx_learning-0.9.4/openedx_learning/core/contents → openedx_learning-0.10.0/openedx_learning/apps/authoring/components/migrations}/__init__.py +0 -0
  35. {openedx_learning-0.9.4/openedx_learning/core/contents/migrations → openedx_learning-0.10.0/openedx_learning/apps/authoring/contents}/__init__.py +0 -0
  36. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/contents/admin.py +0 -0
  37. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/contents/migrations/0001_initial.py +0 -0
  38. {openedx_learning-0.9.4/openedx_learning/core/publishing → openedx_learning-0.10.0/openedx_learning/apps/authoring/contents/migrations}/__init__.py +0 -0
  39. {openedx_learning-0.9.4/openedx_learning/core/publishing/migrations → openedx_learning-0.10.0/openedx_learning/apps/authoring/publishing}/__init__.py +0 -0
  40. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/publishing/admin.py +0 -0
  41. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/publishing/migrations/0001_initial.py +0 -0
  42. {openedx_learning-0.9.4/openedx_learning/core → openedx_learning-0.10.0/openedx_learning/apps/authoring}/publishing/migrations/0002_alter_learningpackage_key_and_more.py +0 -0
  43. {openedx_learning-0.9.4/openedx_learning/lib → openedx_learning-0.10.0/openedx_learning/apps/authoring/publishing/migrations}/__init__.py +0 -0
  44. {openedx_learning-0.9.4/openedx_learning/rest_api → openedx_learning-0.10.0/openedx_learning/contrib}/__init__.py +0 -0
  45. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/contrib/media_server/__init__.py +0 -0
  46. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/contrib/media_server/apps.py +0 -0
  47. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/contrib/media_server/urls.py +0 -0
  48. {openedx_learning-0.9.4/openedx_learning/rest_api/v1 → openedx_learning-0.10.0/openedx_learning/lib}/__init__.py +0 -0
  49. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/lib/admin_utils.py +0 -0
  50. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/lib/cache.py +0 -0
  51. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/lib/collations.py +0 -0
  52. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/lib/fields.py +0 -0
  53. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/lib/managers.py +0 -0
  54. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/lib/test_utils.py +0 -0
  55. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/lib/validators.py +0 -0
  56. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning/py.typed +0 -0
  57. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning.egg-info/dependency_links.txt +0 -0
  58. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning.egg-info/not-zip-safe +0 -0
  59. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning.egg-info/requires.txt +2 -2
  60. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_learning.egg-info/top_level.txt +0 -0
  61. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/__init__.py +0 -0
  62. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/__init__.py +0 -0
  63. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/__init__.py +0 -0
  64. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/admin.py +0 -0
  65. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/api.py +0 -0
  66. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/apps.py +0 -0
  67. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/data.py +0 -0
  68. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/__init__.py +0 -0
  69. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/actions.py +0 -0
  70. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/api.py +0 -0
  71. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/exceptions.py +0 -0
  72. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/import_plan.py +0 -0
  73. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/parsers.py +0 -0
  74. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/tasks.py +0 -0
  75. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/template.csv +0 -0
  76. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/import_export/template.json +0 -0
  77. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0001_initial.py +0 -0
  78. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0001_squashed.py +0 -0
  79. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0002_auto_20230718_2026.py +0 -0
  80. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0003_auto_20230721_1238.py +0 -0
  81. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0004_auto_20230723_2001.py +0 -0
  82. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0005_language_taxonomy.py +0 -0
  83. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0006_alter_objecttag_unique_together.py +0 -0
  84. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0006_auto_20230802_1631.py +0 -0
  85. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0007_tag_import_task_log_null_fix.py +0 -0
  86. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0008_taxonomy_description_not_null.py +0 -0
  87. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0009_alter_objecttag_object_id.py +0 -0
  88. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0010_cleanups.py +0 -0
  89. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0011_remove_required.py +0 -0
  90. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0012_language_taxonomy.py +0 -0
  91. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0013_tag_parent_blank.py +0 -0
  92. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0014_minor_fixes.py +0 -0
  93. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0015_taxonomy_export_id.py +0 -0
  94. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0016_object_tag_export_id.py +0 -0
  95. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/0017_alter_tagimporttask_status.py +0 -0
  96. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/migrations/__init__.py +0 -0
  97. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/models/__init__.py +0 -0
  98. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/models/base.py +0 -0
  99. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/models/import_export.py +0 -0
  100. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/models/system_defined.py +0 -0
  101. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/models/utils.py +0 -0
  102. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/__init__.py +0 -0
  103. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/paginators.py +0 -0
  104. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/urls.py +0 -0
  105. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/utils.py +0 -0
  106. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/v1/__init__.py +0 -0
  107. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/v1/permissions.py +0 -0
  108. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/v1/serializers.py +0 -0
  109. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/v1/urls.py +0 -0
  110. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/v1/views.py +0 -0
  111. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rest_api/v1/views_import.py +0 -0
  112. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/rules.py +0 -0
  113. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/core/tagging/urls.py +0 -0
  114. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/openedx_tagging/py.typed +0 -0
  115. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/requirements/base.in +0 -0
  116. {openedx_learning-0.9.4 → openedx_learning-0.10.0}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openedx-learning
3
- Version: 0.9.4
4
- Summary: An experiment.
3
+ Version: 0.10.0
4
+ Summary: Open edX Learning Core and Tagging.
5
5
  Home-page: https://github.com/openedx/openedx-learning
6
6
  Author: David Ormsbee
7
7
  Author-email: dave@tcril.org
@@ -19,26 +19,23 @@ Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Requires-Python: >=3.8
21
21
  License-File: LICENSE.txt
22
- Requires-Dist: edx-drf-extensions
23
22
  Requires-Dist: rules<4.0
24
- Requires-Dist: celery
25
23
  Requires-Dist: Django<5.0
24
+ Requires-Dist: edx-drf-extensions
26
25
  Requires-Dist: attrs
26
+ Requires-Dist: celery
27
27
  Requires-Dist: djangorestframework<4.0
28
28
 
29
- openedx-learning
30
- =============================
29
+ Open edX Learning Core (and Tagging)
30
+ ====================================
31
31
 
32
32
  |pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
33
33
  |license-badge|
34
34
 
35
- This is experimentation/prototyping and not in any way production ready!
36
- ------------------------------------------------------------------------
37
-
38
35
  Overview
39
36
  --------
40
37
 
41
- The Open edX Learning repository holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform.
38
+ The ``openedx_learning`` package holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform. At the moment, this repo also contains the ``openedx_tagging`` package, but this will likely be moved out in the future.
42
39
 
43
40
  Motivation
44
41
  ----------
@@ -54,18 +51,16 @@ Parts
54
51
  ~~~~~
55
52
 
56
53
  * ``openedx_learning.lib`` is for shared utilities, and may include things like custom field types, plugin registration code, etc.
57
- * ``openedx_learning.core`` contains our Core Django apps, where foundational data structures and APIs will live.
54
+ * ``openedx_learning.apps`` contains our Learning Core Django apps, where foundational data structures and APIs will live. The first of these is ``authoring``, which holds apps related to the editing and publishing of learning content.
58
55
  * ``openedx_tagging.core`` contains the core Tagging app, which provides data structures and apis for tagging Open edX objects.
59
56
 
60
- App Dependencies
61
- ~~~~~~~~~~~~~~~~
57
+ Learning Core Package Dependencies
58
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62
59
 
63
- Anything can import from ``openedx_learning.lib``.
60
+ Learning Core code should never import from ``edx-platform``.
64
61
 
65
- Core apps can import from each other, but cannot import from other apps outside of core. For those apps:
62
+ We want to be very strict about dependency management internally as well. Please read the `.importlinter config file <.importlinter>`_ file and the `Python API Conventions ADR <docs/decisions/0016-python-public-api-conventions>`_ for more details.
66
63
 
67
- * ``learning_publishing`` has no dependencies. All the other apps depend on it.
68
- * ``learning_composition`` and ``learning_navigation`` both depend on ``learning_partitioning``
69
64
 
70
65
  Model Conventions
71
66
  ~~~~~~~~~~~~~~~~~
@@ -74,7 +69,7 @@ We have a few different identifier types in the schema, and we try to avoid ``_i
74
69
 
75
70
  * ``id`` is the auto-generated, internal row ID and primary key. This never changes. Data models should make foreign keys to this field, as per Django convention.
76
71
  * ``uuid`` is a randomly generated UUID4. This is the stable way to refer to a row/resource from an external service. This never changes. This is separate from ``id`` mostly because there are performance penalties when using UUIDs as primary keys with MySQL.
77
- * ``key`` is intended to be a case-sensitive, alphanumeric key, which holds some meaning to library clients. This is usually stable, but can be changed, depending on the business logic of the client. The apps in this repo should make no assumptions about it being stable. It can be used as a suffix.
72
+ * ``key`` is intended to be a case-sensitive, alphanumeric key, which holds some meaning to library clients. This is usually stable, but can be changed, depending on the business logic of the client. The apps in this repo should make no assumptions about it being stable. It can be used as a suffix. Since ``key`` is a reserved name on certain database systems, the database field is ``_key``.
78
73
  * ``num`` is like ``key``, but for use when it's strictly numeric. It can also be used as a suffix.
79
74
 
80
75
 
@@ -89,7 +84,7 @@ The structure of this repo follows [OEP-0049](https://open-edx-proposals.readthe
89
84
  Code Overview
90
85
  -------------
91
86
 
92
- The ``openedx_learning.apps`` package contains all our Django applications. All apps are named with a ``learning_`` prefix to better avoid name conflicts, because Django's app namespace is flat. Apps will adhere to `OEP-0049: Django App Patterns <https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0049-django-app-patterns.html>`_.
87
+ The ``openedx_learning.apps`` package contains all our Django applications.
93
88
 
94
89
  Development Workflow
95
90
  --------------------
@@ -103,7 +98,7 @@ One Time Setup
103
98
  cd openedx-learning
104
99
 
105
100
  # Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
106
- mkvirtualenv -p python3.8 openedx-learning
101
+ mkvirtualenv -p python3.11 openedx-learning
107
102
 
108
103
 
109
104
  Every time you develop something in this repo
@@ -1,16 +1,13 @@
1
- openedx-learning
2
- =============================
1
+ Open edX Learning Core (and Tagging)
2
+ ====================================
3
3
 
4
4
  |pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
5
5
  |license-badge|
6
6
 
7
- This is experimentation/prototyping and not in any way production ready!
8
- ------------------------------------------------------------------------
9
-
10
7
  Overview
11
8
  --------
12
9
 
13
- The Open edX Learning repository holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform.
10
+ The ``openedx_learning`` package holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform. At the moment, this repo also contains the ``openedx_tagging`` package, but this will likely be moved out in the future.
14
11
 
15
12
  Motivation
16
13
  ----------
@@ -26,18 +23,16 @@ Parts
26
23
  ~~~~~
27
24
 
28
25
  * ``openedx_learning.lib`` is for shared utilities, and may include things like custom field types, plugin registration code, etc.
29
- * ``openedx_learning.core`` contains our Core Django apps, where foundational data structures and APIs will live.
26
+ * ``openedx_learning.apps`` contains our Learning Core Django apps, where foundational data structures and APIs will live. The first of these is ``authoring``, which holds apps related to the editing and publishing of learning content.
30
27
  * ``openedx_tagging.core`` contains the core Tagging app, which provides data structures and apis for tagging Open edX objects.
31
28
 
32
- App Dependencies
33
- ~~~~~~~~~~~~~~~~
29
+ Learning Core Package Dependencies
30
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
31
 
35
- Anything can import from ``openedx_learning.lib``.
32
+ Learning Core code should never import from ``edx-platform``.
36
33
 
37
- Core apps can import from each other, but cannot import from other apps outside of core. For those apps:
34
+ We want to be very strict about dependency management internally as well. Please read the `.importlinter config file <.importlinter>`_ file and the `Python API Conventions ADR <docs/decisions/0016-python-public-api-conventions>`_ for more details.
38
35
 
39
- * ``learning_publishing`` has no dependencies. All the other apps depend on it.
40
- * ``learning_composition`` and ``learning_navigation`` both depend on ``learning_partitioning``
41
36
 
42
37
  Model Conventions
43
38
  ~~~~~~~~~~~~~~~~~
@@ -46,7 +41,7 @@ We have a few different identifier types in the schema, and we try to avoid ``_i
46
41
 
47
42
  * ``id`` is the auto-generated, internal row ID and primary key. This never changes. Data models should make foreign keys to this field, as per Django convention.
48
43
  * ``uuid`` is a randomly generated UUID4. This is the stable way to refer to a row/resource from an external service. This never changes. This is separate from ``id`` mostly because there are performance penalties when using UUIDs as primary keys with MySQL.
49
- * ``key`` is intended to be a case-sensitive, alphanumeric key, which holds some meaning to library clients. This is usually stable, but can be changed, depending on the business logic of the client. The apps in this repo should make no assumptions about it being stable. It can be used as a suffix.
44
+ * ``key`` is intended to be a case-sensitive, alphanumeric key, which holds some meaning to library clients. This is usually stable, but can be changed, depending on the business logic of the client. The apps in this repo should make no assumptions about it being stable. It can be used as a suffix. Since ``key`` is a reserved name on certain database systems, the database field is ``_key``.
50
45
  * ``num`` is like ``key``, but for use when it's strictly numeric. It can also be used as a suffix.
51
46
 
52
47
 
@@ -61,7 +56,7 @@ The structure of this repo follows [OEP-0049](https://open-edx-proposals.readthe
61
56
  Code Overview
62
57
  -------------
63
58
 
64
- The ``openedx_learning.apps`` package contains all our Django applications. All apps are named with a ``learning_`` prefix to better avoid name conflicts, because Django's app namespace is flat. Apps will adhere to `OEP-0049: Django App Patterns <https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0049-django-app-patterns.html>`_.
59
+ The ``openedx_learning.apps`` package contains all our Django applications.
65
60
 
66
61
  Development Workflow
67
62
  --------------------
@@ -75,7 +70,7 @@ One Time Setup
75
70
  cd openedx-learning
76
71
 
77
72
  # Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
78
- mkvirtualenv -p python3.8 openedx-learning
73
+ mkvirtualenv -p python3.11 openedx-learning
79
74
 
80
75
 
81
76
  Every time you develop something in this repo
@@ -1,4 +1,4 @@
1
1
  """
2
2
  Open edX Learning ("Learning Core").
3
3
  """
4
- __version__ = "0.9.4"
4
+ __version__ = "0.10.0"
@@ -0,0 +1,14 @@
1
+ """
2
+ This is the public API for content authoring in Learning Core.
3
+
4
+ This is the single ``api`` module that code outside of the
5
+ ``openedx_learning.apps.authoring.*`` package should import from. It will
6
+ re-export the public functions from all api.py modules of all authoring apps. It
7
+ may also implement its own convenience APIs that wrap calls to multiple app
8
+ APIs.
9
+ """
10
+ # These wildcard imports are okay because these api modules declare __all__.
11
+ # pylint: disable=wildcard-import
12
+ from ..apps.authoring.components.api import *
13
+ from ..apps.authoring.contents.api import *
14
+ from ..apps.authoring.publishing.api import *
@@ -0,0 +1,13 @@
1
+ """
2
+ This is where we expose a small handful of models and model mixins that we want
3
+ callers to extend or make foreign keys to. Callers importing this module should
4
+ never instantiate any of the models themselves–there are API functions in
5
+ authoring.py to create and modify data models in a way that keeps those models
6
+ consistent.
7
+ """
8
+ # These wildcard imports are okay because these modules declare __all__.
9
+ # pylint: disable=wildcard-import
10
+ from ..apps.authoring.components.models import *
11
+ from ..apps.authoring.contents.models import *
12
+ from ..apps.authoring.publishing.model_mixins import *
13
+ from ..apps.authoring.publishing.models import *
@@ -21,6 +21,24 @@ from django.db.transaction import atomic
21
21
  from ..publishing import api as publishing_api
22
22
  from .models import Component, ComponentType, ComponentVersion, ComponentVersionContent
23
23
 
24
+ # The public API that will be re-exported by openedx_learning.apps.authoring.api
25
+ # is listed in the __all__ entries below. Internal helper functions that are
26
+ # private to this module should start with an underscore. If a function does not
27
+ # start with an underscore AND it is not in __all__, that function is considered
28
+ # to be callable only by other apps in the authoring package.
29
+ __all__ = [
30
+ "get_or_create_component_type",
31
+ "create_component",
32
+ "create_component_version",
33
+ "create_next_version",
34
+ "create_component_and_version",
35
+ "get_component",
36
+ "get_component_by_key",
37
+ "component_exists_by_key",
38
+ "get_components",
39
+ "create_component_version_content",
40
+ ]
41
+
24
42
 
25
43
  def get_or_create_component_type(namespace: str, name: str) -> ComponentType:
26
44
  """
@@ -308,6 +326,9 @@ def look_up_component_version_content(
308
326
 
309
327
  Can raise a django.core.exceptions.ObjectDoesNotExist error if there is no
310
328
  matching ComponentVersionContent.
329
+
330
+ This API call was only used in our proof-of-concept assets media server, and
331
+ I don't know if we wantto make it a part of the public interface.
311
332
  """
312
333
  queries = (
313
334
  Q(component_version__component__learning_package__key=learning_package_key)
@@ -9,8 +9,8 @@ class ComponentsConfig(AppConfig):
9
9
  Configuration for the Components Django application.
10
10
  """
11
11
 
12
- name = "openedx_learning.core.components"
13
- verbose_name = "Learning Core: Components"
12
+ name = "openedx_learning.apps.authoring.components"
13
+ verbose_name = "Learning Core > Authoring > Components"
14
14
  default_auto_field = "django.db.models.BigAutoField"
15
15
  label = "oel_components"
16
16
 
@@ -19,12 +19,19 @@ from __future__ import annotations
19
19
 
20
20
  from django.db import models
21
21
 
22
- from ...lib.fields import case_sensitive_char_field, immutable_uuid_field, key_field
23
- from ...lib.managers import WithRelationsManager
22
+ from ....lib.fields import case_sensitive_char_field, immutable_uuid_field, key_field
23
+ from ....lib.managers import WithRelationsManager
24
24
  from ..contents.models import Content
25
25
  from ..publishing.model_mixins import PublishableEntityMixin, PublishableEntityVersionMixin
26
26
  from ..publishing.models import LearningPackage
27
27
 
28
+ __all__ = [
29
+ "ComponentType",
30
+ "Component",
31
+ "ComponentVersion",
32
+ "ComponentVersionContent",
33
+ ]
34
+
28
35
 
29
36
  class ComponentType(models.Model):
30
37
  """
@@ -11,9 +11,21 @@ from datetime import datetime
11
11
  from django.core.files.base import ContentFile
12
12
  from django.db.transaction import atomic
13
13
 
14
- from ...lib.fields import create_hash_digest
14
+ from ....lib.fields import create_hash_digest
15
15
  from .models import Content, MediaType
16
16
 
17
+ # The public API that will be re-exported by openedx_learning.apps.authoring.api
18
+ # is listed in the __all__ entries below. Internal helper functions that are
19
+ # private to this module should start with an underscore. If a function does not
20
+ # start with an underscore AND it is not in __all__, that function is considered
21
+ # to be callable only by other apps in the authoring package.
22
+ __all__ = [
23
+ "get_or_create_media_type",
24
+ "get_content",
25
+ "get_or_create_text_content",
26
+ "get_or_create_file_content",
27
+ ]
28
+
17
29
 
18
30
  def get_or_create_media_type(mime_type: str) -> MediaType:
19
31
  """
@@ -9,7 +9,7 @@ class ContentsConfig(AppConfig):
9
9
  Configuration for the Contents Django application.
10
10
  """
11
11
 
12
- name = "openedx_learning.core.contents"
13
- verbose_name = "Learning Core: Contents"
12
+ name = "openedx_learning.apps.authoring.contents"
13
+ verbose_name = "Learning Core > Authoring > Contents"
14
14
  default_auto_field = "django.db.models.BigAutoField"
15
15
  label = "oel_contents"
@@ -13,10 +13,15 @@ from django.core.files.storage import Storage, default_storage
13
13
  from django.core.validators import MaxValueValidator
14
14
  from django.db import models
15
15
 
16
- from ...lib.fields import MultiCollationTextField, case_insensitive_char_field, hash_field, manual_date_time_field
17
- from ...lib.managers import WithRelationsManager
16
+ from ....lib.fields import MultiCollationTextField, case_insensitive_char_field, hash_field, manual_date_time_field
17
+ from ....lib.managers import WithRelationsManager
18
18
  from ..publishing.models import LearningPackage
19
19
 
20
+ __all__ = [
21
+ "MediaType",
22
+ "Content",
23
+ ]
24
+
20
25
 
21
26
  def get_storage() -> Storage:
22
27
  """
@@ -23,6 +23,34 @@ from .models import (
23
23
  PublishLogRecord,
24
24
  )
25
25
 
26
+ # The public API that will be re-exported by openedx_learning.apps.authoring.api
27
+ # is listed in the __all__ entries below. Internal helper functions that are
28
+ # private to this module should start with an underscore. If a function does not
29
+ # start with an underscore AND it is not in __all__, that function is considered
30
+ # to be callable only by other apps in the authoring package.
31
+ __all__ = [
32
+ "get_learning_package",
33
+ "get_learning_package_by_key",
34
+ "create_learning_package",
35
+ "update_learning_package",
36
+ "learning_package_exists",
37
+ "create_publishable_entity",
38
+ "create_publishable_entity_version",
39
+ "get_publishable_entity",
40
+ "get_publishable_entity_by_key",
41
+ "get_last_publish",
42
+ "get_all_drafts",
43
+ "get_entities_with_unpublished_changes",
44
+ "get_entities_with_unpublished_deletes",
45
+ "publish_all_drafts",
46
+ "get_draft_version",
47
+ "get_published_version",
48
+ "set_draft_version",
49
+ "soft_delete_draft",
50
+ "reset_drafts_to_published",
51
+ "register_content_models",
52
+ ]
53
+
26
54
 
27
55
  def get_learning_package(learning_package_id: int, /) -> LearningPackage:
28
56
  """
@@ -105,6 +133,13 @@ def update_learning_package(
105
133
  return lp
106
134
 
107
135
 
136
+ def learning_package_exists(key: str) -> bool:
137
+ """
138
+ Check whether a LearningPackage with a particular key exists.
139
+ """
140
+ return LearningPackage.objects.filter(key=key).exists()
141
+
142
+
108
143
  def create_publishable_entity(
109
144
  learning_package_id: int,
110
145
  /,
@@ -167,13 +202,6 @@ def get_publishable_entity_by_key(learning_package_id, /, key) -> PublishableEnt
167
202
  )
168
203
 
169
204
 
170
- def learning_package_exists(key: str) -> bool:
171
- """
172
- Check whether a LearningPackage with a particular key exists.
173
- """
174
- return LearningPackage.objects.filter(key=key).exists()
175
-
176
-
177
205
  def get_last_publish(learning_package_id: int, /) -> PublishLog | None:
178
206
  return PublishLog.objects \
179
207
  .filter(learning_package_id=learning_package_id) \
@@ -10,7 +10,7 @@ class PublishingConfig(AppConfig):
10
10
  Configuration for the publishing Django application.
11
11
  """
12
12
 
13
- name = "openedx_learning.core.publishing"
14
- verbose_name = "Learning Core: Publishing"
13
+ name = "openedx_learning.apps.authoring.publishing"
14
+ verbose_name = "Learning Core > Authoring > Publishing"
15
15
  default_auto_field = "django.db.models.BigAutoField"
16
16
  label = "oel_publishing"
@@ -11,6 +11,12 @@ from django.db.models.query import QuerySet
11
11
 
12
12
  from .models import PublishableEntity, PublishableEntityVersion
13
13
 
14
+ __all__ = [
15
+ "PublishableEntityMixin",
16
+ "PublishableEntityVersionMixin",
17
+ "PublishableContentModelRegistry",
18
+ ]
19
+
14
20
 
15
21
  class PublishableEntityMixin(models.Model):
16
22
  """
@@ -23,6 +23,16 @@ from openedx_learning.lib.fields import (
23
23
  manual_date_time_field,
24
24
  )
25
25
 
26
+ __all__ = [
27
+ "LearningPackage",
28
+ "PublishableEntity",
29
+ "PublishableEntityVersion",
30
+ "Draft",
31
+ "PublishLog",
32
+ "PublishLogRecord",
33
+ "Published",
34
+ ]
35
+
26
36
 
27
37
  class LearningPackage(models.Model): # type: ignore[django-manager-missing]
28
38
  """
@@ -8,7 +8,7 @@ from pathlib import Path
8
8
  from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
9
9
  from django.http import FileResponse, Http404
10
10
 
11
- from openedx_learning.core.components.api import look_up_component_version_content
11
+ from openedx_learning.apps.authoring.components.api import look_up_component_version_content
12
12
 
13
13
 
14
14
  def component_asset(
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openedx-learning
3
- Version: 0.9.4
4
- Summary: An experiment.
3
+ Version: 0.10.0
4
+ Summary: Open edX Learning Core and Tagging.
5
5
  Home-page: https://github.com/openedx/openedx-learning
6
6
  Author: David Ormsbee
7
7
  Author-email: dave@tcril.org
@@ -19,26 +19,23 @@ Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Requires-Python: >=3.8
21
21
  License-File: LICENSE.txt
22
- Requires-Dist: edx-drf-extensions
23
22
  Requires-Dist: rules<4.0
24
- Requires-Dist: celery
25
23
  Requires-Dist: Django<5.0
24
+ Requires-Dist: edx-drf-extensions
26
25
  Requires-Dist: attrs
26
+ Requires-Dist: celery
27
27
  Requires-Dist: djangorestframework<4.0
28
28
 
29
- openedx-learning
30
- =============================
29
+ Open edX Learning Core (and Tagging)
30
+ ====================================
31
31
 
32
32
  |pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
33
33
  |license-badge|
34
34
 
35
- This is experimentation/prototyping and not in any way production ready!
36
- ------------------------------------------------------------------------
37
-
38
35
  Overview
39
36
  --------
40
37
 
41
- The Open edX Learning repository holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform.
38
+ The ``openedx_learning`` package holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform. At the moment, this repo also contains the ``openedx_tagging`` package, but this will likely be moved out in the future.
42
39
 
43
40
  Motivation
44
41
  ----------
@@ -54,18 +51,16 @@ Parts
54
51
  ~~~~~
55
52
 
56
53
  * ``openedx_learning.lib`` is for shared utilities, and may include things like custom field types, plugin registration code, etc.
57
- * ``openedx_learning.core`` contains our Core Django apps, where foundational data structures and APIs will live.
54
+ * ``openedx_learning.apps`` contains our Learning Core Django apps, where foundational data structures and APIs will live. The first of these is ``authoring``, which holds apps related to the editing and publishing of learning content.
58
55
  * ``openedx_tagging.core`` contains the core Tagging app, which provides data structures and apis for tagging Open edX objects.
59
56
 
60
- App Dependencies
61
- ~~~~~~~~~~~~~~~~
57
+ Learning Core Package Dependencies
58
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62
59
 
63
- Anything can import from ``openedx_learning.lib``.
60
+ Learning Core code should never import from ``edx-platform``.
64
61
 
65
- Core apps can import from each other, but cannot import from other apps outside of core. For those apps:
62
+ We want to be very strict about dependency management internally as well. Please read the `.importlinter config file <.importlinter>`_ file and the `Python API Conventions ADR <docs/decisions/0016-python-public-api-conventions>`_ for more details.
66
63
 
67
- * ``learning_publishing`` has no dependencies. All the other apps depend on it.
68
- * ``learning_composition`` and ``learning_navigation`` both depend on ``learning_partitioning``
69
64
 
70
65
  Model Conventions
71
66
  ~~~~~~~~~~~~~~~~~
@@ -74,7 +69,7 @@ We have a few different identifier types in the schema, and we try to avoid ``_i
74
69
 
75
70
  * ``id`` is the auto-generated, internal row ID and primary key. This never changes. Data models should make foreign keys to this field, as per Django convention.
76
71
  * ``uuid`` is a randomly generated UUID4. This is the stable way to refer to a row/resource from an external service. This never changes. This is separate from ``id`` mostly because there are performance penalties when using UUIDs as primary keys with MySQL.
77
- * ``key`` is intended to be a case-sensitive, alphanumeric key, which holds some meaning to library clients. This is usually stable, but can be changed, depending on the business logic of the client. The apps in this repo should make no assumptions about it being stable. It can be used as a suffix.
72
+ * ``key`` is intended to be a case-sensitive, alphanumeric key, which holds some meaning to library clients. This is usually stable, but can be changed, depending on the business logic of the client. The apps in this repo should make no assumptions about it being stable. It can be used as a suffix. Since ``key`` is a reserved name on certain database systems, the database field is ``_key``.
78
73
  * ``num`` is like ``key``, but for use when it's strictly numeric. It can also be used as a suffix.
79
74
 
80
75
 
@@ -89,7 +84,7 @@ The structure of this repo follows [OEP-0049](https://open-edx-proposals.readthe
89
84
  Code Overview
90
85
  -------------
91
86
 
92
- The ``openedx_learning.apps`` package contains all our Django applications. All apps are named with a ``learning_`` prefix to better avoid name conflicts, because Django's app namespace is flat. Apps will adhere to `OEP-0049: Django App Patterns <https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0049-django-app-patterns.html>`_.
87
+ The ``openedx_learning.apps`` package contains all our Django applications.
93
88
 
94
89
  Development Workflow
95
90
  --------------------
@@ -103,7 +98,7 @@ One Time Setup
103
98
  cd openedx-learning
104
99
 
105
100
  # Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
106
- mkvirtualenv -p python3.8 openedx-learning
101
+ mkvirtualenv -p python3.11 openedx-learning
107
102
 
108
103
 
109
104
  Every time you develop something in this repo
@@ -12,36 +12,40 @@ openedx_learning.egg-info/dependency_links.txt
12
12
  openedx_learning.egg-info/not-zip-safe
13
13
  openedx_learning.egg-info/requires.txt
14
14
  openedx_learning.egg-info/top_level.txt
15
+ openedx_learning/api/__init__.py
16
+ openedx_learning/api/authoring.py
17
+ openedx_learning/api/authoring_models.py
18
+ openedx_learning/apps/__init__.py
19
+ openedx_learning/apps/authoring/__init__.py
20
+ openedx_learning/apps/authoring/components/__init__.py
21
+ openedx_learning/apps/authoring/components/admin.py
22
+ openedx_learning/apps/authoring/components/api.py
23
+ openedx_learning/apps/authoring/components/apps.py
24
+ openedx_learning/apps/authoring/components/models.py
25
+ openedx_learning/apps/authoring/components/migrations/0001_initial.py
26
+ openedx_learning/apps/authoring/components/migrations/0002_alter_componentversioncontent_key.py
27
+ openedx_learning/apps/authoring/components/migrations/__init__.py
28
+ openedx_learning/apps/authoring/contents/__init__.py
29
+ openedx_learning/apps/authoring/contents/admin.py
30
+ openedx_learning/apps/authoring/contents/api.py
31
+ openedx_learning/apps/authoring/contents/apps.py
32
+ openedx_learning/apps/authoring/contents/models.py
33
+ openedx_learning/apps/authoring/contents/migrations/0001_initial.py
34
+ openedx_learning/apps/authoring/contents/migrations/__init__.py
35
+ openedx_learning/apps/authoring/publishing/__init__.py
36
+ openedx_learning/apps/authoring/publishing/admin.py
37
+ openedx_learning/apps/authoring/publishing/api.py
38
+ openedx_learning/apps/authoring/publishing/apps.py
39
+ openedx_learning/apps/authoring/publishing/model_mixins.py
40
+ openedx_learning/apps/authoring/publishing/models.py
41
+ openedx_learning/apps/authoring/publishing/migrations/0001_initial.py
42
+ openedx_learning/apps/authoring/publishing/migrations/0002_alter_learningpackage_key_and_more.py
43
+ openedx_learning/apps/authoring/publishing/migrations/__init__.py
15
44
  openedx_learning/contrib/__init__.py
16
45
  openedx_learning/contrib/media_server/__init__.py
17
46
  openedx_learning/contrib/media_server/apps.py
18
47
  openedx_learning/contrib/media_server/urls.py
19
48
  openedx_learning/contrib/media_server/views.py
20
- openedx_learning/core/__init__.py
21
- openedx_learning/core/components/__init__.py
22
- openedx_learning/core/components/admin.py
23
- openedx_learning/core/components/api.py
24
- openedx_learning/core/components/apps.py
25
- openedx_learning/core/components/models.py
26
- openedx_learning/core/components/migrations/0001_initial.py
27
- openedx_learning/core/components/migrations/0002_alter_componentversioncontent_key.py
28
- openedx_learning/core/components/migrations/__init__.py
29
- openedx_learning/core/contents/__init__.py
30
- openedx_learning/core/contents/admin.py
31
- openedx_learning/core/contents/api.py
32
- openedx_learning/core/contents/apps.py
33
- openedx_learning/core/contents/models.py
34
- openedx_learning/core/contents/migrations/0001_initial.py
35
- openedx_learning/core/contents/migrations/__init__.py
36
- openedx_learning/core/publishing/__init__.py
37
- openedx_learning/core/publishing/admin.py
38
- openedx_learning/core/publishing/api.py
39
- openedx_learning/core/publishing/apps.py
40
- openedx_learning/core/publishing/model_mixins.py
41
- openedx_learning/core/publishing/models.py
42
- openedx_learning/core/publishing/migrations/0001_initial.py
43
- openedx_learning/core/publishing/migrations/0002_alter_learningpackage_key_and_more.py
44
- openedx_learning/core/publishing/migrations/__init__.py
45
49
  openedx_learning/lib/__init__.py
46
50
  openedx_learning/lib/admin_utils.py
47
51
  openedx_learning/lib/cache.py
@@ -50,12 +54,6 @@ openedx_learning/lib/fields.py
50
54
  openedx_learning/lib/managers.py
51
55
  openedx_learning/lib/test_utils.py
52
56
  openedx_learning/lib/validators.py
53
- openedx_learning/rest_api/__init__.py
54
- openedx_learning/rest_api/apps.py
55
- openedx_learning/rest_api/urls.py
56
- openedx_learning/rest_api/v1/__init__.py
57
- openedx_learning/rest_api/v1/components.py
58
- openedx_learning/rest_api/v1/urls.py
59
57
  openedx_tagging/__init__.py
60
58
  openedx_tagging/py.typed
61
59
  openedx_tagging/core/__init__.py
@@ -67,7 +67,7 @@ CHANGELOG = open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst')).read(
67
67
  setup(
68
68
  name='openedx-learning',
69
69
  version=VERSION,
70
- description="""An experiment.""",
70
+ description="""Open edX Learning Core and Tagging.""",
71
71
  long_description=README + '\n\n' + CHANGELOG,
72
72
  author='David Ormsbee',
73
73
  author_email='dave@tcril.org',
@@ -1,14 +0,0 @@
1
- """
2
- Django metadata for the Learning Core REST API app
3
- """
4
- from django.apps import AppConfig
5
-
6
-
7
- class RESTAPIConfig(AppConfig):
8
- """
9
- Configuration for the Learning Core REST API Django app.
10
- """
11
-
12
- name = "openedx_learning.rest_api"
13
- verbose_name = "Learning Core: REST API"
14
- default_auto_field = "django.db.models.BigAutoField"
@@ -1,6 +0,0 @@
1
- """
2
- URLs for the Learning Core REST API
3
- """
4
- from django.urls import include, path
5
-
6
- urlpatterns = [path("v1/", include("openedx_learning.rest_api.v1.urls"))]
@@ -1,30 +0,0 @@
1
- """
2
- This is just an example REST API endpoint.
3
- """
4
- from rest_framework import viewsets
5
-
6
- from openedx_learning.core.components.models import Component
7
-
8
-
9
- class ComponentViewSet(viewsets.ViewSet):
10
- """
11
- Example endpoints for a Components REST API. Not implemented.
12
- """
13
- def list(self, request):
14
- _items = Component.objects.all()
15
- raise NotImplementedError
16
-
17
- def retrieve(self, request, pk=None):
18
- raise NotImplementedError
19
-
20
- def create(self, request):
21
- raise NotImplementedError
22
-
23
- def update(self, request, pk=None):
24
- raise NotImplementedError
25
-
26
- def partial_update(self, request, pk=None):
27
- raise NotImplementedError
28
-
29
- def destroy(self, request, pk=None):
30
- raise NotImplementedError
@@ -1,10 +0,0 @@
1
- """
2
- URLs for the Learning Core REST API v1
3
- """
4
- from rest_framework.routers import DefaultRouter
5
-
6
- from . import components
7
-
8
- router = DefaultRouter()
9
- router.register(r"components", components.ComponentViewSet, basename="component")
10
- urlpatterns = router.urls
@@ -1,6 +1,6 @@
1
- edx-drf-extensions
2
1
  rules<4.0
3
- celery
4
2
  Django<5.0
3
+ edx-drf-extensions
5
4
  attrs
5
+ celery
6
6
  djangorestframework<4.0