summaryrefslogtreecommitdiff
path: root/django/core/serializers/python.py
AgeCommit message (Collapse)Author
2013-02-12Fixed #19746 -- Allow deserialization of pk-less dataNick Sandford
2013-02-05Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`.Simon Charette
2012-09-30Fixed #9279 -- Added ignorenonexistent option to loaddataPreston Holmes
Thanks to Roman Gladkov for the initial patch and Simon Charette for review.
2012-08-08[py3] Fixed 'iterable but non string' detectionClaude Paroz
In Python 3, the str type has an __iter__ attribute. Therefore, the presence of an __iter__ attribute is not sufficient to distinguish 'standard' iterables (list, tuple) from strings.
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-08-07[py3] Fixed access to dict keys/values/items.Aymeric Augustin
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-26Fixed #5423 -- Made dumpdata output one row at a time.Claude Paroz
This should prevent storing all rows in memory when big sets of data are dumped. See ticket for heroic contributors.
2012-03-12Fix #17879: Corrected regression in python (inherited by yaml and json) ↵Karen Tracey
serializer that prevented serializing model instances with null FK ref to a model when serializing with natural keys. Thanks danfairs and tmitchell. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17685 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04Fixed #17602 -- Stopped the XML serializer from doing unneeded queries. ↵Jannis Leidel
Thanks, gnosek. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21Reverting r14994 (at request of SmileyChris) because of some backwards ↵Russell Keith-Magee
compatibility issues that need to be resolved. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21Fixes #13252 -- Use the natural key instead of the primary key when serializingChris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-18Fixed #13030 -- Corrected natural key deserialization to subclasses. Thanks ↵Russell Keith-Magee
to yishaibeeri for the report and test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #1142 -- Added multiple database support.Russell Keith-Magee
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-14Fixed #7052 -- Added support for natural keys in serialization.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03Fixed #10109 -- Removed the use of raw SQL in many-to-many fields by ↵Russell Keith-Magee
introducing an autogenerated through model. This is the first part of Alex Gaynor's GSoC project to add Multi-db support to Django. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13Fixed #9522 -- Modified handling of values in base serializer so that field ↵Russell Keith-Magee
subclasses can define their own value_to_string() method for serialization. Thanks to Alex Koshelev for the report and initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Fixed #8651: correctly deserialize objects with 0 for pk/fk.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Fixed #8134 -- Corrected serialization of m2m fields with intermediate ↵Russell Keith-Magee
models. Thanks to Rock Howard for the report, and kire for the test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17Fixed #6110 -- Mark the python format serializer as for internal use only. ↵Malcolm Tredinnick
Thanks, empty. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #4714 -- Modified serializers to handle None primary keys correctly. ↵Russell Keith-Magee
This slightly changes the output format for primary keys on JSON and YAML serializers (PKs will be output as 1, rather than "1". However, fixtures in the old format will still load ok. Thanks for the patch, pigletto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
backwards compatible for all practical purposes. Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28Fixed a serialization problem with objects that have a foreign key on an ↵Russell Keith-Magee
object whose primary key is a OneToOneField. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14Fixed #4288 -- Modified serializers to pay attention to the to_field ↵Russell Keith-Magee
attribute on ForeignKeys. Thanks to Sandro Dentella for the report and the helpful test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-13Added various fixes to serializer implementations. Fixes mostly deal with ↵Russell Keith-Magee
handling nulls, non-integer primary key values (e.g., OneToOne fields or strings), and reconstruction of primary key references in related fields. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26Fixed #3390: the serializer can now contain forward references. Thanks, Russ.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27Fixed a flaw in the serializers that prevented OneToOneFields being ↵Russell Keith-Magee
serialized as JSON objects. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-07Fixed #2921: deserialization no longer failes on NULL primary keys. Thanks, ↵Jacob Kaplan-Moss
mir@noris.de. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21Fixed a bunch of spurious imports, typos, and other small errors turned up ↵Jacob Kaplan-Moss
by a pass through PyFlakes. This covers about the first third of the errors. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-29Added a JSON serializer, a few more tests, and a couple more lines of docs.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3237 bcc190cf-cafb-0310-a4f2-bffc1f526a37