Permalink
Browse files

add possibility to serialize all objects with '*'

  • Loading branch information...
1 parent fa98c8d commit 6202accc7401abcc380d44749953779d3c9389b9 bladmorv committed Feb 7, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 fixture_magic/management/commands/dump_object.py
@@ -39,7 +39,10 @@ def handle(self, *args, **options):
dump_me = loading.get_model(app_label, model_name)
try:
- objs = dump_me.objects.filter(pk__in=[int(i) for i in ids])
+ if ids[0] == '*':
+ objs = dump_me.objects.all()
+ else:
+ objs = dump_me.objects.filter(pk__in=[int(i) for i in ids])
except ValueError:
# We might have primary keys thar are just strings...
objs = dump_me.objects.filter(pk__in=ids)

0 comments on commit 6202acc

Please sign in to comment.