openedx-learning 0.18.3__py2.py3-none-any.whl → 0.19.0__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.
- openedx_learning/__init__.py +1 -1
- openedx_learning/api/authoring.py +1 -0
- openedx_learning/api/authoring_models.py +1 -1
- openedx_learning/apps/authoring/components/api.py +3 -3
- openedx_learning/apps/authoring/components/apps.py +1 -1
- openedx_learning/apps/authoring/components/models.py +9 -14
- openedx_learning/apps/authoring/contents/models.py +1 -1
- openedx_learning/apps/authoring/publishing/api.py +459 -3
- openedx_learning/apps/authoring/publishing/apps.py +9 -0
- openedx_learning/apps/authoring/publishing/migrations/0003_containers.py +54 -0
- openedx_learning/apps/authoring/publishing/models/__init__.py +27 -0
- openedx_learning/apps/authoring/publishing/models/container.py +70 -0
- openedx_learning/apps/authoring/publishing/models/draft_published.py +95 -0
- openedx_learning/apps/authoring/publishing/models/entity_list.py +69 -0
- openedx_learning/apps/authoring/publishing/models/learning_package.py +75 -0
- openedx_learning/apps/authoring/publishing/models/publish_log.py +106 -0
- openedx_learning/apps/authoring/publishing/{model_mixins.py → models/publishable_entity.py} +284 -41
- openedx_learning/apps/authoring/units/__init__.py +0 -0
- openedx_learning/apps/authoring/units/api.py +290 -0
- openedx_learning/apps/authoring/units/apps.py +25 -0
- openedx_learning/apps/authoring/units/migrations/0001_initial.py +36 -0
- openedx_learning/apps/authoring/units/migrations/__init__.py +0 -0
- openedx_learning/apps/authoring/units/models.py +50 -0
- openedx_learning/contrib/media_server/apps.py +1 -1
- openedx_learning/lib/managers.py +7 -1
- openedx_learning/lib/validators.py +1 -1
- {openedx_learning-0.18.3.dist-info → openedx_learning-0.19.0.dist-info}/METADATA +3 -3
- {openedx_learning-0.18.3.dist-info → openedx_learning-0.19.0.dist-info}/RECORD +35 -23
- {openedx_learning-0.18.3.dist-info → openedx_learning-0.19.0.dist-info}/WHEEL +1 -1
- openedx_tagging/core/tagging/api.py +4 -4
- openedx_tagging/core/tagging/models/base.py +1 -1
- openedx_tagging/core/tagging/rest_api/v1/permissions.py +1 -1
- openedx_tagging/core/tagging/rules.py +1 -2
- openedx_learning/apps/authoring/publishing/models.py +0 -517
- {openedx_learning-0.18.3.dist-info → openedx_learning-0.19.0.dist-info}/LICENSE.txt +0 -0
- {openedx_learning-0.18.3.dist-info → openedx_learning-0.19.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Unit Django application initialization.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from django.apps import AppConfig
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UnitsConfig(AppConfig):
|
|
9
|
+
"""
|
|
10
|
+
Configuration for the units Django application.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
name = "openedx_learning.apps.authoring.units"
|
|
14
|
+
verbose_name = "Learning Core > Authoring > Units"
|
|
15
|
+
default_auto_field = "django.db.models.BigAutoField"
|
|
16
|
+
label = "oel_units"
|
|
17
|
+
|
|
18
|
+
def ready(self):
|
|
19
|
+
"""
|
|
20
|
+
Register Unit and UnitVersion.
|
|
21
|
+
"""
|
|
22
|
+
from ..publishing.api import register_content_models # pylint: disable=import-outside-toplevel
|
|
23
|
+
from .models import Unit, UnitVersion # pylint: disable=import-outside-toplevel
|
|
24
|
+
|
|
25
|
+
register_content_models(Unit, UnitVersion)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Generated by Django 4.2.19 on 2025-03-11 04:31
|
|
2
|
+
|
|
3
|
+
import django.db.models.deletion
|
|
4
|
+
from django.db import migrations, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
initial = True
|
|
10
|
+
|
|
11
|
+
dependencies = [
|
|
12
|
+
('oel_publishing', '0003_containers'),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
operations = [
|
|
16
|
+
migrations.CreateModel(
|
|
17
|
+
name='Unit',
|
|
18
|
+
fields=[
|
|
19
|
+
('container', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='oel_publishing.container')),
|
|
20
|
+
],
|
|
21
|
+
options={
|
|
22
|
+
'abstract': False,
|
|
23
|
+
},
|
|
24
|
+
bases=('oel_publishing.container',),
|
|
25
|
+
),
|
|
26
|
+
migrations.CreateModel(
|
|
27
|
+
name='UnitVersion',
|
|
28
|
+
fields=[
|
|
29
|
+
('container_version', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='oel_publishing.containerversion')),
|
|
30
|
+
],
|
|
31
|
+
options={
|
|
32
|
+
'abstract': False,
|
|
33
|
+
},
|
|
34
|
+
bases=('oel_publishing.containerversion',),
|
|
35
|
+
),
|
|
36
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Models that implement units
|
|
3
|
+
"""
|
|
4
|
+
from django.db import models
|
|
5
|
+
|
|
6
|
+
from ..publishing.models import Container, ContainerVersion
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"Unit",
|
|
10
|
+
"UnitVersion",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Unit(Container):
|
|
15
|
+
"""
|
|
16
|
+
A Unit is type of Container that holds Components.
|
|
17
|
+
|
|
18
|
+
Via Container and its PublishableEntityMixin, Units are also publishable
|
|
19
|
+
entities and can be added to other containers.
|
|
20
|
+
"""
|
|
21
|
+
container = models.OneToOneField(
|
|
22
|
+
Container,
|
|
23
|
+
on_delete=models.CASCADE,
|
|
24
|
+
parent_link=True,
|
|
25
|
+
primary_key=True,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class UnitVersion(ContainerVersion):
|
|
30
|
+
"""
|
|
31
|
+
A UnitVersion is a specific version of a Unit.
|
|
32
|
+
|
|
33
|
+
Via ContainerVersion and its EntityList, it defines the list of Components
|
|
34
|
+
in this version of the Unit.
|
|
35
|
+
"""
|
|
36
|
+
container_version = models.OneToOneField(
|
|
37
|
+
ContainerVersion,
|
|
38
|
+
on_delete=models.CASCADE,
|
|
39
|
+
parent_link=True,
|
|
40
|
+
primary_key=True,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def unit(self):
|
|
45
|
+
""" Convenience accessor to the Unit this version is associated with """
|
|
46
|
+
return self.container_version.container.unit # pylint: disable=no-member
|
|
47
|
+
|
|
48
|
+
# Note: the 'publishable_entity_version' field is inherited and will appear on this model, but does not exist
|
|
49
|
+
# in the underlying database table. It only exists in the ContainerVersion table.
|
|
50
|
+
# You can verify this by running 'python manage.py sqlmigrate oel_units 0001_initial'
|
|
@@ -15,7 +15,7 @@ class MediaServerConfig(AppConfig):
|
|
|
15
15
|
verbose_name = "Learning Core: Media Server"
|
|
16
16
|
default_auto_field = "django.db.models.BigAutoField"
|
|
17
17
|
|
|
18
|
-
def ready(self):
|
|
18
|
+
def ready(self) -> None:
|
|
19
19
|
if not settings.DEBUG:
|
|
20
20
|
# Until we get proper security and support for running this app
|
|
21
21
|
# under a separate domain, just don't allow it to be run in
|
openedx_learning/lib/managers.py
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Custom Django ORM Managers.
|
|
3
3
|
"""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from typing import TypeVar
|
|
7
|
+
|
|
4
8
|
from django.db import models
|
|
5
9
|
from django.db.models.query import QuerySet
|
|
6
10
|
|
|
11
|
+
M = TypeVar('M', bound=models.Model)
|
|
12
|
+
|
|
7
13
|
|
|
8
|
-
class WithRelationsManager(models.Manager):
|
|
14
|
+
class WithRelationsManager(models.Manager[M]):
|
|
9
15
|
"""
|
|
10
16
|
Custom Manager that adds select_related to the default queryset.
|
|
11
17
|
|
|
@@ -7,7 +7,7 @@ from django.core.exceptions import ValidationError
|
|
|
7
7
|
from django.utils.translation import gettext_lazy as _
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
def validate_utc_datetime(dt: datetime):
|
|
10
|
+
def validate_utc_datetime(dt: datetime) -> None:
|
|
11
11
|
if dt.tzinfo != timezone.utc:
|
|
12
12
|
raise ValidationError(
|
|
13
13
|
_("The timezone for %(datetime)s is not UTC."),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: openedx-learning
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19.0
|
|
4
4
|
Summary: Open edX Learning Core and Tagging.
|
|
5
5
|
Home-page: https://github.com/openedx/openedx-learning
|
|
6
6
|
Author: David Ormsbee
|
|
@@ -18,10 +18,10 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Requires-Python: >=3.11
|
|
20
20
|
License-File: LICENSE.txt
|
|
21
|
-
Requires-Dist: rules<4.0
|
|
22
21
|
Requires-Dist: attrs
|
|
23
|
-
Requires-Dist: edx-drf-extensions
|
|
24
22
|
Requires-Dist: Django<5.0
|
|
23
|
+
Requires-Dist: rules<4.0
|
|
24
|
+
Requires-Dist: edx-drf-extensions
|
|
25
25
|
Requires-Dist: celery
|
|
26
26
|
Requires-Dist: djangorestframework<4.0
|
|
27
27
|
Dynamic: author
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
openedx_learning/__init__.py,sha256=
|
|
1
|
+
openedx_learning/__init__.py,sha256=de9JrtQMO5tVm1WwyxT5eY8XnVN7AdgqRkaQee-ZUGk,69
|
|
2
2
|
openedx_learning/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
openedx_learning/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
openedx_learning/api/authoring.py,sha256=
|
|
5
|
-
openedx_learning/api/authoring_models.py,sha256=
|
|
4
|
+
openedx_learning/api/authoring.py,sha256=AuEegFTT3tAer_3zSxcxqLq3Yd_eilk-Hxt4ESYearA,970
|
|
5
|
+
openedx_learning/api/authoring_models.py,sha256=oXwqeMAnXBWgVIUcJa0he5QjHvG296AJE-1hDpjd8JM,681
|
|
6
6
|
openedx_learning/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
openedx_learning/apps/authoring/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
openedx_learning/apps/authoring/collections/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -18,9 +18,9 @@ openedx_learning/apps/authoring/collections/migrations/0005_alter_collection_opt
|
|
|
18
18
|
openedx_learning/apps/authoring/collections/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
openedx_learning/apps/authoring/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
openedx_learning/apps/authoring/components/admin.py,sha256=zfEpuBEySMYpUZzygaE2MDoI8SH-2H3xIL20YCSCMLo,4582
|
|
21
|
-
openedx_learning/apps/authoring/components/api.py,sha256=
|
|
22
|
-
openedx_learning/apps/authoring/components/apps.py,sha256=
|
|
23
|
-
openedx_learning/apps/authoring/components/models.py,sha256=
|
|
21
|
+
openedx_learning/apps/authoring/components/api.py,sha256=ygSb5G8RzsIQzXqyJiqNwuGJp9r388ayuW3UuJNYHh8,24997
|
|
22
|
+
openedx_learning/apps/authoring/components/apps.py,sha256=Rcydv_FH-rVvuWIFqUezBNOh8DtrZHyozZM2yqX2JKE,778
|
|
23
|
+
openedx_learning/apps/authoring/components/models.py,sha256=ttZzVnMZTa14-qudrLb4CFuCanEQJT8cuC_iVPH8XTA,10887
|
|
24
24
|
openedx_learning/apps/authoring/components/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
openedx_learning/apps/authoring/components/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
openedx_learning/apps/authoring/components/management/commands/add_assets_to_component.py,sha256=0dJ77NZZoNzYheOdFPXtJrjdL_Z-pCNg3l1rbEGnMCY,3175
|
|
@@ -32,21 +32,33 @@ openedx_learning/apps/authoring/contents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5
|
|
|
32
32
|
openedx_learning/apps/authoring/contents/admin.py,sha256=9Njd_lje1emcd168KBWUTGf0mVJ6K-dMYMcqHNjRU4k,1761
|
|
33
33
|
openedx_learning/apps/authoring/contents/api.py,sha256=bXb9yQjPfoP1Ynf1aAYz3BEPffK7H5cnba6KdPFSiG0,8818
|
|
34
34
|
openedx_learning/apps/authoring/contents/apps.py,sha256=EEUZEnww7TcYcyxMovZthG2muNxd7j7nxBIf21gKrp4,398
|
|
35
|
-
openedx_learning/apps/authoring/contents/models.py,sha256=
|
|
35
|
+
openedx_learning/apps/authoring/contents/models.py,sha256=8CYrHK7CZ4U3F7Den4ZV_al7zdoi5ba6X2C0LRinA68,17606
|
|
36
36
|
openedx_learning/apps/authoring/contents/migrations/0001_initial.py,sha256=FtOTmIGX2KHpjw-PHbfRjxkFEomI5CEDhNKCZ7IpFeE,3060
|
|
37
37
|
openedx_learning/apps/authoring/contents/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
openedx_learning/apps/authoring/publishing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
openedx_learning/apps/authoring/publishing/admin.py,sha256=F-0QlVQmuovLIF258XK_vKJdOnn7lLa_0A5veE72TKc,4830
|
|
40
|
-
openedx_learning/apps/authoring/publishing/api.py,sha256=
|
|
41
|
-
openedx_learning/apps/authoring/publishing/apps.py,sha256=
|
|
42
|
-
openedx_learning/apps/authoring/publishing/model_mixins.py,sha256=DGM6cZSNX4KZHy5xWtNy6yO4bRT04VDus8yZJ4v3vI0,14447
|
|
43
|
-
openedx_learning/apps/authoring/publishing/models.py,sha256=ImMAujPDc2-CECZw_yvVlUOdtGYwmt99TJ2r1HJkkV8,20488
|
|
40
|
+
openedx_learning/apps/authoring/publishing/api.py,sha256=JAm3a3ItiQYe9agqGHHNoTZ6LYhhMzw3JIZ-BVH9BMM,35911
|
|
41
|
+
openedx_learning/apps/authoring/publishing/apps.py,sha256=v9PTe3YoICaYT9wfu268ZkVAlnZFvxi-DqYdbRi25bY,750
|
|
44
42
|
openedx_learning/apps/authoring/publishing/migrations/0001_initial.py,sha256=wvekNV19YRSdxRmQaFnLSn_nCsQlHIucPDVMmgKf_OE,9272
|
|
45
43
|
openedx_learning/apps/authoring/publishing/migrations/0002_alter_learningpackage_key_and_more.py,sha256=toI7qJhNukk6hirKfFx9EpqTpzF2O2Yq1VpFJusDn2M,806
|
|
44
|
+
openedx_learning/apps/authoring/publishing/migrations/0003_containers.py,sha256=k5P1LFkjQT-42yyHE2f57dAMQKafLuJCTRaCBMKWcjc,2519
|
|
46
45
|
openedx_learning/apps/authoring/publishing/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
+
openedx_learning/apps/authoring/publishing/models/__init__.py,sha256=Ou6Ks3qxEhel9uHLpzi77jlkb_IHc9_WIfqxOZJuqaE,1059
|
|
47
|
+
openedx_learning/apps/authoring/publishing/models/container.py,sha256=GCUD3WTlgvgZSQOKcoOsfhNAfc5pz3Wbs9ClE9mhtB0,2594
|
|
48
|
+
openedx_learning/apps/authoring/publishing/models/draft_published.py,sha256=dDZfbTcqLmnOhgIG-H8mhPFLRks_c03VE-ynGD_CNeo,3632
|
|
49
|
+
openedx_learning/apps/authoring/publishing/models/entity_list.py,sha256=EWpkUHUqJr5xKGJCRQ494xugdULxMXxYviFOot9ypUU,3009
|
|
50
|
+
openedx_learning/apps/authoring/publishing/models/learning_package.py,sha256=1fuNLHD6k0qGuL0jXYGf4-TA5WczgxJrXUdAIM_JNBI,2688
|
|
51
|
+
openedx_learning/apps/authoring/publishing/models/publish_log.py,sha256=-uMj1X8umqRM259ucOqNt6POeKDpY5RLdA8XnWXt7Go,4109
|
|
52
|
+
openedx_learning/apps/authoring/publishing/models/publishable_entity.py,sha256=tErsaWW_Bh2B4ce_6kdx6mKmGDDFaLKW6W6Ambl0BFk,25191
|
|
53
|
+
openedx_learning/apps/authoring/units/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
+
openedx_learning/apps/authoring/units/api.py,sha256=1sFdNchAZ1aNLEN5imxJWo5D000ACjyoZNfrMzrlilM,9578
|
|
55
|
+
openedx_learning/apps/authoring/units/apps.py,sha256=cIzphjDw5sjIZ3NLE911N7IMUa8JQSXMReNl03uI7jg,701
|
|
56
|
+
openedx_learning/apps/authoring/units/models.py,sha256=eTOwFWC9coQLf0ovx08Mj7zi8mPAWCw9QOznybajRk0,1418
|
|
57
|
+
openedx_learning/apps/authoring/units/migrations/0001_initial.py,sha256=qM_0JGffxECVgXzncHXfgSE-g8u3L3a14R0M1Bnj_Ys,1129
|
|
58
|
+
openedx_learning/apps/authoring/units/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
59
|
openedx_learning/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
60
|
openedx_learning/contrib/media_server/__init__.py,sha256=iYijWFCl5RNR9omSu22kMl49EfponoqXBqXr0HMp4QI,56
|
|
49
|
-
openedx_learning/contrib/media_server/apps.py,sha256=
|
|
61
|
+
openedx_learning/contrib/media_server/apps.py,sha256=GicFBN3N6wzVs5i3RgrQFJZeMlS55gyf4Iq_4cSdI9U,824
|
|
50
62
|
openedx_learning/contrib/media_server/urls.py,sha256=newNjV41sM9A9Oy_rgnZSXdkTFxSHiupIiAsVIGE2CE,365
|
|
51
63
|
openedx_learning/contrib/media_server/views.py,sha256=qZPhdEW_oYj1MEdgLVP6Cq3tRiZtp7dTb7ASaSKZ2HY,1350
|
|
52
64
|
openedx_learning/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -54,18 +66,18 @@ openedx_learning/lib/admin_utils.py,sha256=5z9NrXxmT5j8azx9u1t0AgxV5PIDTc2jPyM5z
|
|
|
54
66
|
openedx_learning/lib/cache.py,sha256=ppT36KiPLdsAF3GfZCF0IdiHodckd2gLiF1sNhjSJuk,958
|
|
55
67
|
openedx_learning/lib/collations.py,sha256=f65575r3BfAvFWU6pdBMsqrxPwFijB2SbJtDXq4UVc4,2401
|
|
56
68
|
openedx_learning/lib/fields.py,sha256=eiGoXMPhRuq25EH2qf6BAODshAQE3DBVdIYAMIUAXW0,7522
|
|
57
|
-
openedx_learning/lib/managers.py,sha256
|
|
69
|
+
openedx_learning/lib/managers.py,sha256=-Q3gxalSqyPZ9Im4DTROW5tF8wVTZLlmfTe62_xmowY,1643
|
|
58
70
|
openedx_learning/lib/test_utils.py,sha256=g3KLuepIZbaDBCsaj9711YuqyUx7LD4gXDcfNC-mWdc,527
|
|
59
|
-
openedx_learning/lib/validators.py,sha256=
|
|
71
|
+
openedx_learning/lib/validators.py,sha256=iqEdEAvFV2tC7Ecssx69kjecpdU8nE87AlDJYrqrsnc,404
|
|
60
72
|
openedx_tagging/__init__.py,sha256=V9N8M7f9LYlAbA_DdPUsHzTnWjYRXKGa5qHw9P1JnNI,30
|
|
61
73
|
openedx_tagging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
74
|
openedx_tagging/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
75
|
openedx_tagging/core/tagging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
76
|
openedx_tagging/core/tagging/admin.py,sha256=Ngc2l9Mf6gkzmqu7aOwq-d0mgV8szx0GzSeuWFX7Kyg,1080
|
|
65
|
-
openedx_tagging/core/tagging/api.py,sha256=
|
|
77
|
+
openedx_tagging/core/tagging/api.py,sha256=zOYBy5hm4Sza6vcXRjMZt0DsVOIxZqfo_tilaFLqIJs,20095
|
|
66
78
|
openedx_tagging/core/tagging/apps.py,sha256=-gp0VYqX4XQzwjjd-G68Ev2Op0INLh9Byz5UOqF5_7k,345
|
|
67
79
|
openedx_tagging/core/tagging/data.py,sha256=421EvmDzdM7H523dBVQk4J0W_UwTT4U5syqPRXUYK4g,1353
|
|
68
|
-
openedx_tagging/core/tagging/rules.py,sha256=
|
|
80
|
+
openedx_tagging/core/tagging/rules.py,sha256=4XpwAoqnAG08rjpxK0G9-PyA7F4Wmkn8Navd9EnKRxo,6605
|
|
69
81
|
openedx_tagging/core/tagging/urls.py,sha256=-0Nzmh0mlF9-GgEuocwBdSJn6n8EINnxR4m4pmPou44,159
|
|
70
82
|
openedx_tagging/core/tagging/import_export/__init__.py,sha256=q5K4JalFQlJxAFUFyqhLY5zQtAskDnRM1H_aVuP_E3Q,83
|
|
71
83
|
openedx_tagging/core/tagging/import_export/actions.py,sha256=n007-M59D0mXYcwi9CDldDDy5JHAaGCVv9dQbiY4pZ4,13275
|
|
@@ -98,7 +110,7 @@ openedx_tagging/core/tagging/migrations/0017_alter_tagimporttask_status.py,sha25
|
|
|
98
110
|
openedx_tagging/core/tagging/migrations/0018_objecttag_is_copied.py,sha256=zmr4b65T0vX6fYc8MpvSmQnYkAiNMpx3RKEd5tudsl8,517
|
|
99
111
|
openedx_tagging/core/tagging/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
112
|
openedx_tagging/core/tagging/models/__init__.py,sha256=yYdOnthuc7EUdfEULtZgqRwn5Y4bbYQmJCjVZqR5GTM,236
|
|
101
|
-
openedx_tagging/core/tagging/models/base.py,sha256=
|
|
113
|
+
openedx_tagging/core/tagging/models/base.py,sha256=RXv4jDncV-JPXMAb62dGYNJhMdiS6kSo24eoG7UeKR4,39655
|
|
102
114
|
openedx_tagging/core/tagging/models/import_export.py,sha256=Aj0pleh0nh2LNS6zmdB1P4bpdgUMmvmobTkqBerORAI,4570
|
|
103
115
|
openedx_tagging/core/tagging/models/system_defined.py,sha256=_6LfvUZGEltvQMtm2OXy6TOLh3C8GnVTqtZDSAZW6K4,9062
|
|
104
116
|
openedx_tagging/core/tagging/models/utils.py,sha256=-A3Dj24twmTf65UB7G4WLvb_9qEvduEPIwahZ-FJDlg,1926
|
|
@@ -107,13 +119,13 @@ openedx_tagging/core/tagging/rest_api/paginators.py,sha256=BUIAg3taihHx7uAjpTZAG
|
|
|
107
119
|
openedx_tagging/core/tagging/rest_api/urls.py,sha256=egXaRQv1EAgF04ThgVZBQuvLK1LimuyUKKBD2Hbqb10,148
|
|
108
120
|
openedx_tagging/core/tagging/rest_api/utils.py,sha256=XZXixZ44vpNlxiyFplW8Lktyh_m1EfR3Y-tnyvA7acc,3620
|
|
109
121
|
openedx_tagging/core/tagging/rest_api/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
110
|
-
openedx_tagging/core/tagging/rest_api/v1/permissions.py,sha256=
|
|
122
|
+
openedx_tagging/core/tagging/rest_api/v1/permissions.py,sha256=eD-RFK29vIqPOEQ_QXR4uOV4Jz0fQkNTy8KdVQDE2ak,2419
|
|
111
123
|
openedx_tagging/core/tagging/rest_api/v1/serializers.py,sha256=0HQD_Jrf6-YpocYfzGs74YBYjXe9Yo7cXU0A4VKr5Dw,13876
|
|
112
124
|
openedx_tagging/core/tagging/rest_api/v1/urls.py,sha256=dNUKCtUCx_YzrwlbEbpDfjGVQbb2QdJ1VuJCkladj6E,752
|
|
113
125
|
openedx_tagging/core/tagging/rest_api/v1/views.py,sha256=Hf92cy-tE767DE9FgsZcPKiCYrf5ihfETz8qGKBnuiU,36278
|
|
114
126
|
openedx_tagging/core/tagging/rest_api/v1/views_import.py,sha256=kbHUPe5A6WaaJ3J1lFIcYCt876ecLNQfd19m7YYub6c,1470
|
|
115
|
-
openedx_learning-0.
|
|
116
|
-
openedx_learning-0.
|
|
117
|
-
openedx_learning-0.
|
|
118
|
-
openedx_learning-0.
|
|
119
|
-
openedx_learning-0.
|
|
127
|
+
openedx_learning-0.19.0.dist-info/LICENSE.txt,sha256=QTW2QN7q3XszgUAXm9Dzgtu5LXYKbR1SGnqMa7ufEuY,35139
|
|
128
|
+
openedx_learning-0.19.0.dist-info/METADATA,sha256=xvtsGiNCb627JQXOZqEi7Ws6bPM6TwMlBxKfkBn7zz0,8975
|
|
129
|
+
openedx_learning-0.19.0.dist-info/WHEEL,sha256=SrDKpSbFN1G94qcmBqS9nyHcDMp9cUS9OC06hC0G3G0,109
|
|
130
|
+
openedx_learning-0.19.0.dist-info/top_level.txt,sha256=IYFbr5mgiEHd-LOtZmXj3q3a0bkGK1M9LY7GXgnfi4M,33
|
|
131
|
+
openedx_learning-0.19.0.dist-info/RECORD,,
|
|
@@ -28,7 +28,7 @@ from .models.utils import ConcatNull, StringAgg
|
|
|
28
28
|
TagDoesNotExist = Tag.DoesNotExist
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def create_taxonomy(
|
|
31
|
+
def create_taxonomy( # pylint: disable=too-many-positional-arguments
|
|
32
32
|
name: str,
|
|
33
33
|
description: str | None = None,
|
|
34
34
|
enabled=True,
|
|
@@ -191,9 +191,9 @@ def get_object_tags(
|
|
|
191
191
|
)
|
|
192
192
|
if not include_deleted:
|
|
193
193
|
# Exclude if the whole taxonomy was deleted
|
|
194
|
-
base_qs = base_qs.exclude(
|
|
194
|
+
base_qs = base_qs.exclude(taxonomy=None)
|
|
195
195
|
# Exclude if just the tag is deleted
|
|
196
|
-
base_qs = base_qs.exclude(
|
|
196
|
+
base_qs = base_qs.exclude(tag=None, taxonomy__allow_free_text=False)
|
|
197
197
|
tags = (
|
|
198
198
|
base_qs
|
|
199
199
|
# Preload related objects, including data for the "get_lineage" method on ObjectTag/Tag:
|
|
@@ -321,7 +321,7 @@ def _get_current_tags(
|
|
|
321
321
|
return current_tags
|
|
322
322
|
|
|
323
323
|
|
|
324
|
-
def tag_object(
|
|
324
|
+
def tag_object( # pylint: disable=too-many-positional-arguments
|
|
325
325
|
object_id: str,
|
|
326
326
|
taxonomy: Taxonomy | None,
|
|
327
327
|
tags: list[str],
|
|
@@ -6,8 +6,7 @@ from __future__ import annotations
|
|
|
6
6
|
from typing import Callable, Union
|
|
7
7
|
|
|
8
8
|
import django.contrib.auth.models
|
|
9
|
-
|
|
10
|
-
import rules # type: ignore[import]
|
|
9
|
+
import rules
|
|
11
10
|
from attrs import define
|
|
12
11
|
|
|
13
12
|
from .models import Tag, Taxonomy
|