On 1/20/07, limodou <[EMAIL PROTECTED]> wrote:
>
> On 1/20/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> >
> > On 1/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > > I was looking for something like this :) I'll test it today :)
> >
> > You should also keep in mind that the fixtures patch that is part of
> > ticket #2333 can be used to dump and reload database contents. This
> > patch should be applied shortly (it has been slated for inclusion
> > before v1.0)
> >
> Yeah, I of cause see your suggestion, but I found the process is not
> very correctly and enough. for example: I cannot specify the output
> directory.

./manage.py dumpdb > /foo/bar/out.data

dumpdb (this will be changed to 'dumpdata' in the final patch) dumps
to stdout; you can put that data wherever you want.

> And if there is foreignkey relationship in one app, the
> order of output data is very important. Because the restore process
> will use model.objects.create to insert a new record, so if the
> foreign object is not created yet, the inserting will be failed.

If you create objects and foreign key relations in a single
transaction, there shouldn't be any issue with object creation order.

> And
> what I do is using cursor.execute, so there are no these problem. And
> also my tool can support the restore after you changed the model, and
> I think is handy for me.

How does the patch in #2333 prevent you from doing this? Dump your
data, change your model, modify your data to add new required fields,
load your data.

> And I also want to proposal that manage.py should has a plugin
> interface, so that user can contribute their own useful tool, and this
> tool can be invoked through:
>
> manage tool customtool

There is no need for this. If you need to write your own tools, they
can be .py scripts, invoking whatever Django calls are required.
Manage.py doesn't do anything magical that couldn't be easily
replicated in your own script.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to