Re: Flask + MongoEngine + MPTT?
- Bruno Rocha
- 2013-07-13 @ 05:54
I guess I found a solution, and maybe there is no need for a module or
extension, taking a closer look to the mongo manual I realized that i can
use a mix of Parent references with matereialized paths
"slug" : "node_slug",
So I will need index for "slug" and "parent", it seems to much but in that
way I can find the ancestors and children easily, also I can use the
"long_slug" field to query against an <path:long_slug> parameter.
I cant see a way to turn this approach in a flask.ext but I am open to
suggestions or advice from someone who is already using this with mongo.
On Sat, Jul 13, 2013 at 2:16 AM, Bruno Rocha <email@example.com> wrote:
> I am developing a CMS powered by Flask and MongoEngine.
> I have some experience building CMS in Django and in web2py, for both we
> have the MPTT modules/plugins. Recently I used django-mptt to create the
> channel/category structure for a CMS.
> Now I am creating this one in Flask and MongoEngine and I need to know if
> there is some MPTT blueprint/extension available?
> I found this
> http://docs.mongodb.org/manual/tutorial/model-tree-structures/, But
> nothing created on top of flask.ext and mongoengine.
> If I cound not find it, maybe I will start to develop it to use on my
> Bruno Rocha