chore: replace site-configuration script with management command (#101)

* chore: replace site-configuration script with management command
The site-configuration script was used to set the value of the COURSE_CATALOG_API_URL
However, this script is being removed in tutor core as it is no longer required
For this reason, we migrate to the provided create_or_update_site_configuration management command in edx-platform
This commit is contained in:
Danyal Faheem 2025-04-22 15:23:18 +05:00 committed by GitHub
parent b189574e03
commit 7a31ce81fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
- [Improvement] Replace site-configuration script with create_or_update_site_configuration management command in the init task. (by @Danyal-Faheem)

View File

@ -62,5 +62,5 @@
# configuration -- which means that it takes different values for different # configuration -- which means that it takes different values for different
# sites. This is important because the programs and courses returned for each # sites. This is important because the programs and courses returned for each
# site will differ. # site will differ.
site-configuration set -d {{ LMS_HOST }} COURSE_CATALOG_API_URL {% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/api/v1 ./manage.py lms create_or_update_site_configuration {{ LMS_HOST }} --configuration '{"COURSE_CATALOG_API_URL": "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/api/v1"}' --enabled
site-configuration set -d {{ LMS_HOST }}:8000 COURSE_CATALOG_API_URL http://{{ DISCOVERY_HOST }}:8381/api/v1 ./manage.py lms create_or_update_site_configuration {{ LMS_HOST }}:8000 --configuration '{"COURSE_CATALOG_API_URL": "http://{{ DISCOVERY_HOST }}:8381/api/v1"}' --enabled