docs: Update docs to explain the djangocms_versioning contract#511
Merged
docs: Update docs to explain the djangocms_versioning contract#511
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFormalizes the djangocms_versioning integration contract by exposing it on the CMS config and adding documentation that describes the VersionableItem contract and how it applies to pages, admin options, and general versioning integration. Class diagram for the new djangocms_versioning contract attributeclassDiagram
class VersioningCMSConfig {
+dict add_to_context
+dict add_to_field_extension
+tuple contract
+versionables_by_content()
}
class VersionableItem {
}
VersioningCMSConfig ..> VersionableItem : contract
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #511 +/- ##
==========================================
+ Coverage 90.55% 93.72% +3.17%
==========================================
Files 72 76 +4
Lines 2732 2710 -22
Branches 322 0 -322
==========================================
+ Hits 2474 2540 +66
+ Misses 182 170 -12
+ Partials 76 0 -76 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Hey - I've found 3 issues, and left some high level feedback:
- Consider making the
contractdefinition more explicit and readable (e.g.contract = ("djangocms_versioning", VersionableItem)) and grouping it with the other class attributes instead of placing it immediately after__init__.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider making the `contract` definition more explicit and readable (e.g. `contract = ("djangocms_versioning", VersionableItem)`) and grouping it with the other class attributes instead of placing it immediately after `__init__`.
## Individual Comments
### Comment 1
<location> `docs/introduction/working_with_pages.rst:6` </location>
<code_context>
+
+When djangocms-versioning is installed, django CMS pages become versioned. While this
+does not change how you interact with ``Page`` and most importantly ``PageContent``
+objects in your code, it is important to understand how djangocms-verisoning changes the
+result of querying ``PageContent`` objects.
+
</code_context>
<issue_to_address>
**issue (typo):** Fix spelling of "djangocms-verisoning" to "djangocms-versioning".
Use the correct project name "djangocms-versioning" here to match the rest of the documentation.
```suggestion
objects in your code, it is important to understand how djangocms-versioning changes the
```
</issue_to_address>
### Comment 2
<location> `docs/introduction/working_with_pages.rst:220` </location>
<code_context>
+Iterate over all pages with their current content
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Remember using the correct manager when using, e.g. `prefetch_related` or reverse relations
+
+.. code-block:: python
</code_context>
<issue_to_address>
**suggestion (typo):** Improve grammar in the sentence about using the correct manager.
Consider rephrasing to: "Remember to use the correct manager when using, e.g., `prefetch_related` or reverse relations."
```suggestion
Remember to use the correct manager when using, e.g., `prefetch_related` or reverse relations.
```
</issue_to_address>
### Comment 3
<location> `docs/explanations/admin_options.rst:122` </location>
<code_context>
+.. image:: /static/Status-indicators.png
:width: 50%
You can use these on your content model's changelist view admin by adding the following fixin to the model's Admin class:
</code_context>
<issue_to_address>
**issue (typo):** Correct "fixin" to "mixin" in the admin explanation.
"mixin" matches the surrounding admin mixin context.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
fsbraun
commented
Feb 4, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Document and formalize the integration contract for djangocms_versioning and surface it in both code and user-facing docs.
Enhancements:
contractattribute on the versioning CMS config to declare the djangocms_versioning VersionableItem integration contract.Documentation:
Related resources
Checklist
masterSlack to find a “pr review buddy” who is going to review my pull request.
Summary by Sourcery
Document and surface the djangocms_versioning integration contract in code and user-facing documentation.
Enhancements:
Documentation: