HI,
I am using django mptt and I also want to use fixtures with my
registered model. However, since mptt inserts fields that are NOT
NULL, I was not able to do so.
I found this link
http://code.google.com/p/django-mptt/source/browse/trunk/docs/models.txt?r=100
where it was described that I have to patch django as in this ticket
http://code.djangoproject.com/attachment/ticket/5422/save-send-raw-flag.diff
in order for fixtures to work with django mptt...
I applied the patch but still I get an error like
"problem installing fixutre 'myfixture': mytable.lft may not be NULL
could anyone tell me how I can get past this problem? [I also want
the hierachy issue taken care of while loading fixutres, i.e. I want
to make sure the "lft" "rght" "tree_id" and "level" field properly
populated while using the loadata]
thanks in advance,
Oumer
PS; while I was looking at the patch, I found that in my current
version of django, the second line of dispatch to be changed was
dispatcher.send(signal=signals.post_save, sender=self.__class__,
instance=self, created=(not record_exists))
instead of
dispatcher.send(signal=signals.post_save, sender=self.__class__,
instance=self, created=(not record_exists))
so I still kept the created attribute but added raw=raw...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---