uralbash / sqlalchemy_mptt

SQLAlchemy nested sets mixin (MPTT)
http://sqlalchemy-mptt.readthedocs.io
MIT License
196 stars 32 forks source link

fix tree shorting #13

Closed uralbash closed 10 years ago

uralbash commented 10 years ago
    print """ level           Nested sets example
        1                    1(1)22
                _______________|___________________
               |               |                   |
        2    2(2)5           6(4)11             12(7)21
               |               ^                   ^
        3    3(3)4       7(5)8   9(6)10    13(8)16   17(10)20
                                              |          |
        4                                  14(9)15   18(11)19

        level           Nested sets example

                                __parent_id______________________
                               |                                 |
        1                    1(1)22                              |
                _______________|___________________              |
               |               |                   |             |
        2    2(2)5           6(4)11             12(7)21          |
               |               ^                   ^             |
        3    3(3)4       7(5)8   9(6)10    13(8)16   17(10)20    |
                                              |          |       |
        4                                  14(9)15   18(11)19    |
                                                         |       |
                                                         |_______|
                    id lft rgt lvl parent tree
    """