Skip to content

Conversation

@wfehr
Copy link
Contributor

@wfehr wfehr commented Oct 22, 2025

These changes provide 3 things:

  1. fix test-runner for updated svglib-version -> Install issue deeplook/svglib#413
    • edit: also added the system dependency for the migration test workflow
    • the version 1.6.0 introduced a new system dependency which will now be installed in the tests
    • another solution if test-runtime is too long with that: pin svglig<1.6.0 for tests
  2. fix metadata for PostContent
    • the old djangocms-blog had translatable models for category and post
    • the new stories (and cms > 4) models now switched into: category = translatable, post => post + post-content
    • PostContent has the ModelMeta-Mixin => Post does not - the _metadata-attribute still remained in Post instead of PostContent
  3. added [og|schemaorg|twitter]_title-attributes for Category/PostContent in _metadata and added checks in tests for that
  4. edit: fixes usage for meta.tag (PostContent) and meta.locale (PostContent + PostCategory)

Tests are running successfully with these changes: https://github.com/wfehr/djangocms-stories/actions/runs/18707460615

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 48.78049% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.00%. Comparing base (bc4bb04) to head (00308ab).

Files with missing lines Patch % Lines
djangocms_stories/models.py 48.78% 15 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   86.67%   86.00%   -0.67%     
==========================================
  Files          23       23              
  Lines        2071     2108      +37     
  Branches      230      239       +9     
==========================================
+ Hits         1795     1813      +18     
- Misses        183      196      +13     
- Partials       93       99       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

wfehr added 3 commits October 22, 2025 08:59
- new svglib version (1.6.0) now requires cairo to be installed
  -> see deeplook/svglib#413
- _metadata-attribute on Post itself was wrong -> the meta didn't work there
  because it was fetched from PostContent
  => so most data was None / not set
@wfehr
Copy link
Contributor Author

wfehr commented Oct 22, 2025

I can of course also provide different PRs if needed - since the changes provided are 2 separate fixes and 1 (little) feature.

@wfehr
Copy link
Contributor Author

wfehr commented Oct 29, 2025

Added another 2 fixes for meta.tag and meta.locale.

Copy link
Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wfehr Thanks so much! Great work!

Can I ask you a few things:

  • Can you please remove the Cairo change - elsewhere I have added svglib!=1.6.0 to the test setup ?
  • Can you undo the changes in the djangocms_blog folder - it is only needed for migration purposes.
  • If at all possible, I would appreciate some basic tests for the new PostContent methods...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants