fujunzhuo / gae-django-cms

Automatically exported from code.google.com/p/gae-django-cms
0 stars 0 forks source link

请问怎么实现无限级目录? #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
V2.0版本,后台的目录无法实现无限级目录方法,加一些代码�
��无法写下去了。
class Category(db.Model):
    parent_cat=db.SelfReferenceProperty()

    def children(self):
        key=self.key()
        return [c for c in Category.all().filter('parent_cat =',self)]

Original issue reported on code.google.com by jxlifar...@gmail.com on 26 Oct 2013 at 4:13