openedx.core.djangoapps.content_libraries.management.commands package#

Submodules#

openedx.core.djangoapps.content_libraries.management.commands.content_libraries_import module#

Command to import modulestore content into Content Libraries.

class openedx.core.djangoapps.content_libraries.management.commands.content_libraries_import.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

Import modulestore content, references by a course, into a Content Libraries library.

add_arguments(parser)#

Add arguments to the argument parser.

handle(*args, **options)#

Collect all blocks from a course that are “importable” and write them to the a blockstore library.

openedx.core.djangoapps.content_libraries.management.commands.reindex_content_library module#

Management command to update content libraries’ search index

class openedx.core.djangoapps.content_libraries.management.commands.reindex_content_library.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

Command to reindex blockstore-based content libraries (single, multiple or all available).

This isn’t needed on a regular basis as signals in various library APIs update the index when creating, updating or deleting libraries. This is usually required when the schema of the index changes, or if indexes are out of sync due to indexing being previously disabled or any other reason.

Examples

./manage.py reindex_content_library lib1 lib2 - reindexes libraries with keys lib1 and lib2 ./manage.py reindex_content_library –all - reindexes all available libraries ./manage.py reindex_content_library –clear-all - clear all libraries indexes

CONFIRMATION_PROMPT_ALL = 'Reindexing all libraries might be a time consuming operation. Do you want to continue?'#
CONFIRMATION_PROMPT_CLEAR = 'This will clear all indexed libraries from elasticsearch. Do you want to continue?'#
add_arguments(parser)#

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)#

The actual logic of the command. Subclasses must implement this method.

help = "\nCommand to reindex blockstore-based content libraries (single, multiple or all available).\n\nThis isn't needed on a regular basis as signals in various library APIs update the index when creating, updating or\ndeleting libraries.\nThis is usually required when the schema of the index changes, or if indexes are out of sync due to indexing\nbeing previously disabled or any other reason.\n\nExamples:\n\n    ./manage.py reindex_content_library lib1 lib2 - reindexes libraries with keys lib1 and lib2\n    ./manage.py reindex_content_library --all - reindexes all available libraries\n    ./manage.py reindex_content_library --clear-all - clear all libraries indexes\n"#

Module contents#