From 0e4b4d5b67a27b2c3404e0dca88cad5798ccbaf1 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Thu, 4 Jul 2024 12:51:36 +0500 Subject: [PATCH] doc: add an instruction for cache programs for tutor dev mode --- .github/workflows/test.yml | 4 ++-- README.rst | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5671b62..428a7b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,13 +9,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.12'] + python-version: ['3.8', '3.12'] steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} - name: Upgrade pip run: python -m pip install --upgrade pip setuptools - name: Install dependencies diff --git a/README.rst b/README.rst index 304d609..45a810b 100644 --- a/README.rst +++ b/README.rst @@ -47,11 +47,16 @@ names by configuring ``DISCOVERY_INDEX_OVERRIDES``:: Re-indexing courses ~~~~~~~~~~~~~~~~~~~ -:: +While running tutor in production mode:: tutor local run discovery ./manage.py refresh_course_metadata --partner_code=openedx tutor local run discovery ./manage.py update_index --disable-change-limit +While running tutor in development mode:: + + tutor dev run discovery ./manage.py refresh_course_metadata --partner_code=dev + tutor dev run discovery ./manage.py update_index --disable-change-limit + Caching programs ~~~~~~~~~~~~~~~~ @@ -65,9 +70,13 @@ Then run the below command, this command will cause errors every time as it trie tutor local run lms ./manage.py lms cache_programs -If you don't want the errors, then make use of an extra argument to the command .i.e. ``--domain``. This argument will be equal to ``local.edly.io`` if you are running tutor local and ``local.edly.io:8000`` if you are running tutor dev:: +Above command will give some errors as it tries to cache programs for all sites. So make use of an extra argument to the command .i.e. ``--domain``. +While running tutor in production mode:: + tutor local run lms ./manage.py lms cache_programs --domain="local.edly.io" - or + +While running tutor in development mode:: + tutor dev run lms ./manage.py lms cache_programs --domain="local.edly.io:8000" This last step should be performed every time you create new or make changes to existing programs. @@ -75,7 +84,7 @@ This last step should be performed every time you create new or make changes to Show Programs Tab ~~~~~~~~~~~~~~~~~ -In order to show programs tab in the LMS dashboard, users will need to manually create an entry in ``Programs api config`` model in LMS Admin Panel. Go to http://local.edly.io/admin/programs/programsapiconfig/. Add ``Marketing path`` equal to ``/programs`` and enable it. Then Programs tab will be shown on the LMS where users can view their registered programs. It will show like as in below picture. +In order to make ``Programs`` tab work in the LMS dashboard, users will need to manually create an entry in ``Programs api config`` model in LMS Admin Panel. Go to http://local.edly.io/admin/programs/programsapiconfig/. Add ``Marketing path`` equal to ``/programs`` and enable it. Then Programs tab will be shown on the LMS where users can view their registered programs. It will show like as in below picture. .. image:: https://github.com/overhangio/tutor-discovery/assets/122095701/e0224011-adc0-41e4-a104-af4cb0c24b82 :alt: Programs Tab on LMS dashboard