liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

dumpscript: specifying individual models #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to be able to specify individual models directly, eg

./manage.py dumpscript myapp.MyModel

Original issue reported on code.google.com by e.willha...@gmail.com on 29 Jul 2008 at 10:59

GoogleCodeExporter commented 8 years ago
First attempt at a solution:
* Missing foreign key and M2M fields are linked using:
         Model.objects.get(primary_key=value)

FIXMES:
* The "objects" manager could be overridden, it would be good to cater for this
* It would be a nice option to automatically include any referenced models

Original comment by e.willha...@gmail.com on 29 Jul 2008 at 11:18

Attachments:

GoogleCodeExporter commented 8 years ago
this patch did not apply cleanly after applying the patch for #34 

currently the only thing i took from this .diff (patch) is the typo fix.
please upload another patch for the current version in svn.

Original comment by v.oostv...@gmail.com on 2 Aug 2008 at 3:19

GoogleCodeExporter commented 8 years ago

Original comment by v.oostv...@gmail.com on 20 Aug 2008 at 9:30

GoogleCodeExporter commented 8 years ago
bump

Original comment by v.oostv...@gmail.com on 13 Sep 2008 at 2:17

GoogleCodeExporter commented 8 years ago
Ok, I've updated the patch to match the current trunk :-) More fun than this 
week's
study anyway...

Original comment by e.willha...@gmail.com on 14 Sep 2008 at 1:06

Attachments:

GoogleCodeExporter commented 8 years ago
seems to work well.  committed in r132 (on the assumption that v.oostveen was 
just
waiting for the updated patch from willhardy, not doing independent work on 
this)

Original comment by carl.j.meyer on 21 Sep 2008 at 4:31

GoogleCodeExporter commented 8 years ago
thanks carl !

i was busy with some other things and didn't have internet over the weekend.

Original comment by v.oostv...@gmail.com on 22 Sep 2008 at 11:36