On Saturday, October 23, 2010, Paul Winkler wrote:
> Tried it out. Interestingly, natural keys are currently used only for
> foreign key references,
> the dump still contains primary keys.
> Looks like there's a patch for leaving out PK's when natural keys are
> used:
>
Tried it out. Interestingly, natural keys are currently used only for
foreign key references,
the dump still contains primary keys.
Looks like there's a patch for leaving out PK's when natural keys are
used:
http://code.djangoproject.com/ticket/13252
That would get me 100% of the way there.
- PW
Thanks Shawn! That was quick!
Meanwhile I just discovered http://farmdev.com/projects/fixture which
I have just confirmed works fine for hand-written fixtures with my
app, although using python classes as fixtures feels a little odd.
Nice that it's cross-platform though, it supports sqlalchemy
And like magic, it's there!
http://docs.djangoproject.com/en/dev/topics/serialization/#natural-keys
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this
It would sometimes be useful to be able to write fixtures that
essentially say "I don't care what the PK of this record is, as long
as I have a way for other records in this fixture to refer to it."
Use case: I'd like a way to pass around useful data sets that people
can load into deployments of
5 matches
Mail list logo