my_dict = dict([(f.attname, getattr(instance, f.attname)) for f in instance
    ._meta.get_fields() if hasattr(f, 'attname')])
How do I "pickle" instances of Django models in a database into sample python code I can use to load sample data?