-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add features to support new content libraries
This commit adds a number of features needed to accomodate content libraries. These are all collected together because this work was done while iteratively making more and more of libraries functional, and it was difficult to properly separate out later. This bumps the version to 0.5.0. New publishing API functions: * Learning Packages * get_learning_package * get_learning_package_by_key, * update_learning_package * Publishable Entities * get_publishable_entity and * get_publishable_entity_by_key * Draft/Publishing * get_last_publish * get_all_drafts * get_entities_with_unpublished_changes * get_entities_with_unpublished_deletes * get_published_version * set_draft_version * soft_delete_draft * reset_drafts_to_published New Components API functions: * create_next_version * get_component_by_key * component_exists_by_key * get_components PublishableEntityMixin improvements: * New property methods: latest, has_unpublished_changes * Existing methods were improved to use model-cached values. Encoding fixes: * collations for multiple fields were changed to be case insensitive in order to better support simple text searches. Model optimizations: * created the WithRelationsManager to more easily define querysets that involve adding select_related fields. This was used to elininate a number of n+1 queries that came up during libraries development. * PublishableEntityVersion.version_num was reduced to a 4-byte PositiveIntegerField instead of using the 8-byte default for openedx_learning apps (it's assumed we will never make more than 2 billion versions of a particular PublishableEntity). This was done to help reduce the size of indexes. Typing: * type annotations were added to many functions and test functions.
- Loading branch information
Showing
20 changed files
with
1,315 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,6 @@ venv/ | |
|
||
# Media files (for uploads) | ||
media/ | ||
|
||
# Media files generated during test runs | ||
test_media/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
""" | ||
Open edX Learning ("Learning Core"). | ||
""" | ||
__version__ = "0.4.4" | ||
__version__ = "0.5.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.