Changes between Version 1 and Version 2 of ModifiedPreorderTreeTraversalInAdmin


Ignore:
Timestamp:
Mar 10, 2006, 6:49:19 PM (19 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModifiedPreorderTreeTraversalInAdmin

    v1 v2  
    1 Looking at the mptt example [http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal] it seemed a bit complicated for a normal user to understand. So i made my own, but considering i cannot group by makes aggregate functions hard (impossible?) to make this work nice, but magic-removal made it easier. But, here it is mostly . Use at will and own RISK, but if/ when you improve it i would like to see it made available.
     1Looking at the mptt example [http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal] it seemed a bit complicated for a normal user to understand. So i made my own, but considering i cannot group by makes aggregate functions hard (impossible?) to make this work nice, but magic-removal made it easier. Currently only works im postgesql and only tested in 8.1. Use at will and own RISK, but if/ when you improve it i would like to see it made available.
    22
    33I attach the file and give a example here. Just add fields to this and in should work.
     4
     5Remember to set the TABLE variable at the top of models to appname_model.
    46
    57Example using project name myproject and app name pages.
Back to Top