django-mptt and fixtures

51 views
Skip to first unread message

pihentagy

unread,
Sep 3, 2008, 10:57:53 AM9/3/08
to Django users
Hi all!

Has anybody tried to load a fixture to a model class, which is
registered with mptt?

I tried and failed, all the internal columns need to be filled.
Has anybody a solution how to dump and/or restore such tables?

thanks
Gergo

Martin Diers

unread,
Sep 3, 2008, 11:59:01 AM9/3/08
to django...@googlegroups.com
The problem with fixtures in documented on the django-mptt page on
Google code. There is a patch you need to apply to get them to work.
The patch is not necessary for Trunk, however django-mptt does not
work on trunk, as too much has changed - in particular, signals.

I would really caution you about this package. Too much magic. Dynamic
model changes are highly problematic. Their custom manger does a lot
of stuff in raw SQL (by necessity - it would be way to slow to use the
ORM). Plus, it's very easy to break things if you are not very careful
to use their custom manager for your query operations. mptt is great,
but you should really understand what is going on before using this
package.

Reply all
Reply to author
Forward
0 new messages