-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: combine RawContent and TextContent into Content (#149)
Combine RawContent and TextContent into a single, unified Content model for storing both text and file-backed data. The reasoning: 1. It reduces confusion when extending the content with models in other apps, since you don't have to choose which one to attach to. 2. It reduces the total storage requirements by removing a table that would have grown to be very large. 3. The old way of having TextContent build on RawContent meant that OLX had to be stored in the file system, which is both redundant (we always want to access it in low-latency text form), and much slower when importing. 4. It gives us the flexibility to more seamlessly optimize the representation of content later, either shifting things from files to text or vice-versa as necessary. 5. It lets us punt the operation question of how we're configuring file storage for a little bit, until the static asset serving support is more fleshed out. It's also worth nothing that we're upgrading to Django 4.2 very shortly, and that the storage configuration options will change. The tradeoff for this is that Content has become more complex, being able to store things as text, a file, or both, and having to decide between them.
- Loading branch information
Showing
22 changed files
with
658 additions
and
574 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
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.5.2" | ||
__version__ = "0.6.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
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.