breaking changes#38
Conversation
create now creates parentless items creaet_child can now accept both a model object and a PathValue for parent
|
i'll also edit the README file to show changes let me know if there's a problem with these changes |
e2e0ea4 to
27f0216
Compare
3a1534d to
428eb22
Compare
|
@mariocesar 👋 |
|
@amirreza8002 sorrry for the late reply. My main concern is that these could break the user use, there are examples where the path is not unique or based in PKs. The first example is https://www.postgresql.org/docs/current/ltree.html#LTREE-EXAMPLE the official example for ltree. I feel I was mistaken when I initially implement using django-treebeard as a reference. I like your proposal, I want to merge it, but will like to also include a way for users to implement as they need and not constraint to pk as I started doing. I'll have more time this week and help you |
allow changing the field that is used in generating the path
|
hi @mariocesar 👋 also added a guide on how to customize the manager when using a non-autogenerated field for path, i thought about handling it out of the box, but i'm not sure how to check if a field is auto-generated, and if it's even worth it let me know what you think |
what i've done so far:
objectstot_objectto avoid confilicting with other packagesTreeManager.createnow creates objects without parents (root items)SubpathandNLeveldatabase functionspathis now autogenerateddeletedelete_cascademake_rootchange_parentget_rootchildrensiblingsadd_childvalidators.pyfileforms.pyfile