From 08d66076365b94967df62bbe1a54dba58bac5124 Mon Sep 17 00:00:00 2001 From: Yusuf Musleh Date: Mon, 23 Oct 2023 21:07:46 +0300 Subject: [PATCH] feat: Add url that exposes taxonomy tags CRUD API (#33525) * feat: Add url that exposes taxonomy tags CRUD API Include `content_tagging` namespace for content_tagging urls in cms for `sub_tags_link` to work in multi-level taxonomy tags. * chore: Bump openedx-learning version --- cms/urls.py | 2 +- openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py | 6 ++++++ requirements/constraints.txt | 2 +- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 7 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cms/urls.py b/cms/urls.py index a949c086eaef..b353e095ea27 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -339,7 +339,7 @@ # Content tagging urlpatterns += [ - path('api/content_tagging/', include(('openedx.core.djangoapps.content_tagging.urls'))), + path('api/content_tagging/', include(('openedx.core.djangoapps.content_tagging.urls', 'content_tagging'))), ] # studio-content-api specific API docs (using drf-spectacular and openapi-v3) diff --git a/openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py index 38bb0a9ac17a..53addf281ce8 100644 --- a/openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py +++ b/openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py @@ -7,6 +7,7 @@ from django.urls.conf import path, include from openedx_tagging.core.tagging.rest_api.v1 import ( + views as oel_tagging_views, views_import as oel_tagging_views_import, ) @@ -17,6 +18,11 @@ router.register("object_tags", views.ObjectTagOrgView, basename="object_tag") urlpatterns = [ + path( + "taxonomies//tags/", + oel_tagging_views.TaxonomyTagsView.as_view(), + name="taxonomy-tags", + ), path( "taxonomies/import/template.", oel_tagging_views_import.TemplateView.as_view(), diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 5e99182b7bcf..e2ff4c0045ce 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -121,7 +121,7 @@ libsass==0.10.0 click==8.1.6 # pinning this version to avoid updates while the library is being developed -openedx-learning==0.2.5 +openedx-learning==0.2.6 # lti-consumer-xblock 9.6.2 contains a breaking change that makes # existing custom parameter configurations unusable. diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 1c9d41bbd435..4674aa210527 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -785,7 +785,7 @@ openedx-filters==1.6.0 # via # -r requirements/edx/kernel.in # lti-consumer-xblock -openedx-learning==0.2.5 +openedx-learning==0.2.6 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index c21f8eb37237..8e92575195a9 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -1318,7 +1318,7 @@ openedx-filters==1.6.0 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # lti-consumer-xblock -openedx-learning==0.2.5 +openedx-learning==0.2.6 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index fef17b68d515..f2491bceaf24 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -925,7 +925,7 @@ openedx-filters==1.6.0 # via # -r requirements/edx/base.txt # lti-consumer-xblock -openedx-learning==0.2.5 +openedx-learning==0.2.6 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 6e3d7266df9b..d3b2b39bedfd 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -992,7 +992,7 @@ openedx-filters==1.6.0 # via # -r requirements/edx/base.txt # lti-consumer-xblock -openedx-learning==0.2.5 +openedx-learning==0.2.6 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt