django-fixture-magic
django-fixture-magic copied to clipboard
Could not dump objects until I modified dump_object.py as per comment
Everything I tried would yield the following error, even on internal Django models:
CommandError: object_class must be provided in the following format: app_name.model_name
Try calling dump_object with --help argument or use the following arguments:
<[--kitchensink | -k] [--natural] [--query] object_class id [id ...]>
Then I tried the fix from this comment on closed issue #45 and after that I was able to dump objects successfully.
I don't understand what that args
line is doing. I could submit a PR removing it but it would be good to know why it is there first.
Django version is 1.9.1
.
For anyone else who runs into this or #45, a workaround is to use JSON
id lookups instead of ID. E.g. --query '{"pk__in": [1]}'
.