> ./manage.py dumpdb > /foo/bar/out.data I don't like this. Because I want to save the data into different files according to each table, but not a single file.
> > 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. Because the idea above, so it's not very suit for my requirement. > > > 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. I don't want to modify every line of data, but I need a default value dealing appoach. And #2333 doesn't support this idea. I didn't try #2333 for: if I remove some fields of a Model, and restore data from data file, how about #2333 will do? > > > 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. > So your thought is very different from mine. I think core.management has many common methods, and users like me hope to reuse them. If there is no such plugin system, so I had to write my personal tool just like db_dump.py, and it'll be a whole program, and I need introduce many things I need from core.management which I think useful. -- I like python! UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad My Blog: http://www.donews.net/limodou --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---