Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add abstract base model AbstractFrontendUIItem #195

Merged
merged 36 commits into from
Mar 21, 2024

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Mar 7, 2024

As discussed in #194 the FrontendUIItem model class does not allow adding model fields, since this would imply subclassing CMSPluginModel twice which is not possible.

To remedy the situation, this PR introduces an abstract base model AbstractFrontendUIItem which by default has one concrete model FrontendUIItem.

If users need to create frontend models with additional model fields, they can do so using AbstractFrontendUIItem.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 86.96%. Comparing base (f11feee) to head (0e7fd74).
Report is 5 commits behind head on master.

Files Patch % Lines
djangocms_frontend/contrib/link/models.py 0.00% 1 Missing and 1 partial ⚠️
djangocms_frontend/contrib/link/forms.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
+ Coverage   86.93%   86.96%   +0.02%     
==========================================
  Files         120      120              
  Lines        3107     3114       +7     
  Branches      330      330              
==========================================
+ Hits         2701     2708       +7     
  Misses        304      304              
  Partials      102      102              

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

@fsbraun fsbraun merged commit eee6258 into django-cms:master Mar 21, 2024
46 of 47 checks passed
@fsbraun fsbraun deleted the feat/abstract-frontenduiitem branch April 10, 2024 15:16
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.

1 participant