-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: merge page with node tree #7947
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
Conversation
…-cms/django-cms into WiP-feat-merge-Page-with-NodeTree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jrief! Great work. Looks promising! It's a big change and I have some comments:
- I strongly promote adding (working) compatibility shims for the changed API:
- A node property for
Page
that returns the page itself. Thereby, custom apps that accesspage.node.something
will not break - Remove
node__
prefixes fromfilter
,order_by
,select_related
inPageQuerySet
- Rename
page.parent
topage.page_parent
to be compatible with django CMS 4.1 and earlier - Use the
RemovedInDjangoCMS43
warning message to mark compatibility code that will need to be removed in the future.
- A node property for
- Add some documentation for developers who need code to run on both django CMS 4.1 and earlier and on django CMS 4.2+ in
docs/upgrade/4.2.0.rst
Links to this documentation should be part of the warnings (https://docs.django-cms.org/en/release-4.2.x/upgrade/4.2.0.html
) - On the smaller things, I've noticed that you use both single and double quotes (
'
and"
). I'd suggest being consistent and opting for double quotes
I'm undecided if we can already remove TreeNode
from the models. @marksweb Do you have an opinion on that? Is there a scenario where custom apps use it?
c0aa851
to
91d6756
Compare
…-cms/django-cms into WiP-feat-merge-Page-with-NodeTree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! LGTM!
605be06
to
d58a4b8
Compare
Description
This is the (huge) pull request to merge models
Page
andTreeNode
intoPage
.There is some additional cleanup to do, because I haven't yet removed all the legacy code for reference.
All unit tests are working.
This pull request shall go into version 4.2.
@fsbraun Please consider to apply it before merging other pull requests, since this presumably will cause a lot of merging conflicts.
Related resources
It is based on the discussion #7873 and we talks about this a few times during
the biweekly meetings.
Checklist
develop-4