openedx-learning 0.10.0__py2.py3-none-any.whl → 0.10.1__py2.py3-none-any.whl

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.
@@ -1,4 +1,4 @@
1
1
  """
2
2
  Open edX Learning ("Learning Core").
3
3
  """
4
- __version__ = "0.10.0"
4
+ __version__ = "0.10.1"
@@ -134,6 +134,8 @@ class Component(PublishableEntityMixin): # type: ignore[django-manager-missing]
134
134
  'publishable_entity__draft__version__componentversion',
135
135
  'publishable_entity__published__version',
136
136
  'publishable_entity__published__version__componentversion',
137
+ 'publishable_entity__published__publish_log_record',
138
+ 'publishable_entity__published__publish_log_record__publish_log',
137
139
  )
138
140
 
139
141
  # This foreign key is technically redundant because we're already locked to
@@ -243,6 +243,18 @@ class PublishableEntityMixin(models.Model):
243
243
 
244
244
  return draft_version_id != published_version_id
245
245
 
246
+ @property
247
+ def last_publish_log(self):
248
+ """
249
+ Return the most recent PublishLog for this component.
250
+
251
+ Return None if the component is not published.
252
+ """
253
+ pub_entity = self.content_obj.publishable_entity
254
+ if hasattr(pub_entity, 'published'):
255
+ return pub_entity.published.publish_log_record.publish_log
256
+ return None
257
+
246
258
  @property
247
259
  def versions(self):
248
260
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openedx-learning
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: Open edX Learning Core and Tagging.
5
5
  Home-page: https://github.com/openedx/openedx-learning
6
6
  Author: David Ormsbee
@@ -14,17 +14,16 @@ Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
15
15
  Classifier: Natural Language :: English
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
- Requires-Python: >=3.8
19
+ Requires-Python: >=3.11
21
20
  License-File: LICENSE.txt
21
+ Requires-Dist: djangorestframework <4.0
22
+ Requires-Dist: celery
22
23
  Requires-Dist: rules <4.0
23
- Requires-Dist: Django <5.0
24
24
  Requires-Dist: edx-drf-extensions
25
+ Requires-Dist: Django <5.0
25
26
  Requires-Dist: attrs
26
- Requires-Dist: celery
27
- Requires-Dist: djangorestframework <4.0
28
27
 
29
28
  Open edX Learning Core (and Tagging)
30
29
  ====================================
@@ -1,4 +1,4 @@
1
- openedx_learning/__init__.py,sha256=DnOb5RNB5dogIDUc96QphWmX4TqWV73iB0Ikmixury4,68
1
+ openedx_learning/__init__.py,sha256=sxP66SsqZrdazYjLOiaM2bmX_0y1CC1gVWmYtO67-5M,68
2
2
  openedx_learning/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  openedx_learning/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  openedx_learning/api/authoring.py,sha256=HPfDBTr4Sxf_GciObkv_7vaUiC9P1GdGEMAZgCFQv_w,615
@@ -9,7 +9,7 @@ openedx_learning/apps/authoring/components/__init__.py,sha256=47DEQpj8HBSa-_TImW
9
9
  openedx_learning/apps/authoring/components/admin.py,sha256=QE7e76C6X2V1AQPxQe6SayQPfCMmbs4RZPEPIGcvTWw,4672
10
10
  openedx_learning/apps/authoring/components/api.py,sha256=1A0xcpW4ciVs_vA-Xd16k4YfFBXhNYjISQyamyq03Uc,13191
11
11
  openedx_learning/apps/authoring/components/apps.py,sha256=YoYPsI9gcleA3uEs8CiLIrjUncRMo2DKbYt4mDfzePg,770
12
- openedx_learning/apps/authoring/components/models.py,sha256=j9k0-FmOkySxYbJ-frMuCR82zrPgsu9K3aCk2IKRdFs,13280
12
+ openedx_learning/apps/authoring/components/models.py,sha256=T-wc7vxaWMlulQmMsVH7m6Pd857P3Eguo0vtflTLURI,13415
13
13
  openedx_learning/apps/authoring/components/migrations/0001_initial.py,sha256=446LkJSFeK8J_-l-bxakZ_BVx_CiJIllGcBYqWcEenA,4664
14
14
  openedx_learning/apps/authoring/components/migrations/0002_alter_componentversioncontent_key.py,sha256=98724dtucRjJCRyLt5p45qXYb2d6-ouVGp7PB6zTG6E,539
15
15
  openedx_learning/apps/authoring/components/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -24,7 +24,7 @@ openedx_learning/apps/authoring/publishing/__init__.py,sha256=47DEQpj8HBSa-_TImW
24
24
  openedx_learning/apps/authoring/publishing/admin.py,sha256=F-0QlVQmuovLIF258XK_vKJdOnn7lLa_0A5veE72TKc,4830
25
25
  openedx_learning/apps/authoring/publishing/api.py,sha256=kZ5tayJzScmaKUmpuWr-EBQ62nDDCZb4713awMpSzrM,15278
26
26
  openedx_learning/apps/authoring/publishing/apps.py,sha256=jUfd78xvXaZg3dwkqXihatbeajJGm3Uz1rJpuyd-3g0,402
27
- openedx_learning/apps/authoring/publishing/model_mixins.py,sha256=cau70b3boi2J3DvkC0UE-sd7Nyjk9TLHJ47-nq89ELQ,13533
27
+ openedx_learning/apps/authoring/publishing/model_mixins.py,sha256=ZzN1AnAKn8e7_UOx4tpyxvInhPEDNWv46G_v2sYYnXM,13955
28
28
  openedx_learning/apps/authoring/publishing/models.py,sha256=ImMAujPDc2-CECZw_yvVlUOdtGYwmt99TJ2r1HJkkV8,20488
29
29
  openedx_learning/apps/authoring/publishing/migrations/0001_initial.py,sha256=wvekNV19YRSdxRmQaFnLSn_nCsQlHIucPDVMmgKf_OE,9272
30
30
  openedx_learning/apps/authoring/publishing/migrations/0002_alter_learningpackage_key_and_more.py,sha256=toI7qJhNukk6hirKfFx9EpqTpzF2O2Yq1VpFJusDn2M,806
@@ -47,7 +47,7 @@ openedx_tagging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  openedx_tagging/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  openedx_tagging/core/tagging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  openedx_tagging/core/tagging/admin.py,sha256=Ngc2l9Mf6gkzmqu7aOwq-d0mgV8szx0GzSeuWFX7Kyg,1080
50
- openedx_tagging/core/tagging/api.py,sha256=JlS8KQiTBd0rEQqEqE5hf7QnCnR9KZRFw-ShcJPhJ4U,18749
50
+ openedx_tagging/core/tagging/api.py,sha256=FLGXU16GRdvYE6-A2uH5MYHkSXwu37TGiIm9XqsyUR8,18795
51
51
  openedx_tagging/core/tagging/apps.py,sha256=-gp0VYqX4XQzwjjd-G68Ev2Op0INLh9Byz5UOqF5_7k,345
52
52
  openedx_tagging/core/tagging/data.py,sha256=421EvmDzdM7H523dBVQk4J0W_UwTT4U5syqPRXUYK4g,1353
53
53
  openedx_tagging/core/tagging/rules.py,sha256=Gzw2RCQxoAv2PpOwOWgpD17XoZfowlFnNgQqYn59q_g,6715
@@ -96,8 +96,8 @@ openedx_tagging/core/tagging/rest_api/v1/serializers.py,sha256=gbvEBLvsmfPc3swWz
96
96
  openedx_tagging/core/tagging/rest_api/v1/urls.py,sha256=dNUKCtUCx_YzrwlbEbpDfjGVQbb2QdJ1VuJCkladj6E,752
97
97
  openedx_tagging/core/tagging/rest_api/v1/views.py,sha256=ZRkSILdb8g5k_BcuuVVfdffEdY9vFQ_YtMa3JrN0Xz8,35581
98
98
  openedx_tagging/core/tagging/rest_api/v1/views_import.py,sha256=kbHUPe5A6WaaJ3J1lFIcYCt876ecLNQfd19m7YYub6c,1470
99
- openedx_learning-0.10.0.dist-info/LICENSE.txt,sha256=QTW2QN7q3XszgUAXm9Dzgtu5LXYKbR1SGnqMa7ufEuY,35139
100
- openedx_learning-0.10.0.dist-info/METADATA,sha256=B3Gg7iIer_sJiWvXtA9Sd4xdbguHC3XIqaAsjhp15I4,8829
101
- openedx_learning-0.10.0.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
102
- openedx_learning-0.10.0.dist-info/top_level.txt,sha256=IYFbr5mgiEHd-LOtZmXj3q3a0bkGK1M9LY7GXgnfi4M,33
103
- openedx_learning-0.10.0.dist-info/RECORD,,
99
+ openedx_learning-0.10.1.dist-info/LICENSE.txt,sha256=QTW2QN7q3XszgUAXm9Dzgtu5LXYKbR1SGnqMa7ufEuY,35139
100
+ openedx_learning-0.10.1.dist-info/METADATA,sha256=1uzukFX-iUJQpUsMLCc7xg8vb-5t1F5XZRWLB1xXUHw,8780
101
+ openedx_learning-0.10.1.dist-info/WHEEL,sha256=ANi2y8tYx-p70pj7MSdqQMJNFJEUgAOyfPpHzqz0w84,109
102
+ openedx_learning-0.10.1.dist-info/top_level.txt,sha256=IYFbr5mgiEHd-LOtZmXj3q3a0bkGK1M9LY7GXgnfi4M,33
103
+ openedx_learning-0.10.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (71.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -190,8 +190,10 @@ def get_object_tags(
190
190
  .exclude(taxonomy__enabled=False) # Exclude if the whole taxonomy is disabled
191
191
  )
192
192
  if not include_deleted:
193
- base_qs = base_qs.exclude(taxonomy_id=None) # Exclude if the whole taxonomy was deleted
194
- base_qs = base_qs.exclude(tag_id=None, taxonomy__allow_free_text=False) # Exclude if just the tag is deleted
193
+ # Exclude if the whole taxonomy was deleted
194
+ base_qs = base_qs.exclude(taxonomy_id=None) # type: ignore
195
+ # Exclude if just the tag is deleted
196
+ base_qs = base_qs.exclude(tag_id=None, taxonomy__allow_free_text=False) # type: ignore
195
197
  tags = (
196
198
  base_qs
197
199
  # Preload related objects, including data for the "get_lineage" method on ObjectTag/Tag: