Commit Graph

194 Commits

Author SHA1 Message Date
Mark Aaron Shirley
e550740b3d Merge remote-tracking branch 'upstream/master' into writable-nested-modelserializer
Conflicts:
	rest_framework/tests/relations_nested.py
2013-05-08 22:39:48 -07:00
Tom Christie
538d2e35e7 lookup_field on hyperlink serializers 2013-05-05 16:47:45 +01:00
Tom Christie
35f99cddc4 lookup_field on hyperlinked fields, and overriddable hyperlinked fields. Closes #688 2013-05-01 09:03:09 +01:00
Tom Christie
22af28d146 Merge master 2013-04-30 19:32:34 +01:00
Tom Christie
21ae3a6691 Drop out attribute 2013-04-30 08:24:33 +01:00
Tom Christie
53f9d4a380 fields shortcut on views 2013-04-29 13:20:15 +01:00
Tom Christie
dc7b1d6430 2.2's PendingDeprecationWarnings now become DeprecationWarnings. 2.3's PendingDeprecationWarnings added. 2013-04-29 12:45:00 +01:00
JC
8cbb715f4c Changed definition of NestedModelSerializer to correct depth handling 2013-04-27 13:23:55 -07:00
Tom Christie
d985aec3c9 DecimalField 2013-04-26 13:59:06 +01:00
Tom Christie
95abe6e844 Cleanup docstrings 2013-04-25 12:47:34 +01:00
Tom Christie
4bf1a09bae Ensure implementation of reverse relations in 'fields' is backwards compatible 2013-04-23 11:31:38 +01:00
Mark Aaron Shirley
7e0a93f0ee Don't use field when saving related data 2013-04-19 10:46:57 -07:00
Mark Aaron Shirley
fdc5cc3d81 Fix model serializer nestesd delete behavior 2013-04-18 10:28:20 -07:00
Mark Aaron Shirley
c7e000e46e Merge remote-tracking branch 'upstream/master' into writable-nested-modelserializer
Conflicts:
	docs/api-guide/serializers.md
2013-04-16 09:55:47 -07:00
Stephan Groß
c329d2f085 Add DecimalField to field_mapping 2013-04-15 13:11:41 +02:00
Tom Christie
76e039d70e First pass on automatically including reverse relationship 2013-04-10 22:38:02 +01:00
Mark Aaron Shirley
73efa96de9 one-many writable nested modelserializer support 2013-04-06 08:43:21 -07:00
J. Paul Reed
889558365b Don't have the ModelSerializer trust deserialized objects to not have redefine bool()ean-ness.
If the model we're using the ModelSerializer for has redefined methods that act as a boolean (__bool__ or __len__), it may not return the object even though it is_valid(), and should.
2013-04-02 01:41:40 -07:00
Tom Christie
7eefcf7e53 Bulk update, allow_add_remove flag 2013-03-25 20:26:34 +00:00
Tom Christie
d97e72cdb2 Cleanup one-one nested tests and implementation 2013-03-25 17:28:23 +00:00
Tom Christie
3f79a9a3d3 one-one writable nested modelserializers 2013-03-22 22:39:45 +00:00
Tom Christie
addf7e9b36 Defer the writable nested modelserializers work 2013-03-22 22:27:03 +00:00
Tom Christie
9bf7c9b714 Merge master 2013-03-22 21:57:37 +00:00
Tom Christie
13794baf70 Bit of extra tidying and plenty of docs 2013-03-22 17:01:06 +00:00
Tom Christie
c32d9969ac Add extra tests for errors from incorrect data with multiple create/update 2013-03-22 12:33:09 +00:00
Tom Christie
b2dc664485 Basic bulk create and bulk update 2013-03-19 14:26:48 +00:00
Craig de Stigter
101fa26ebc use writablefield style for serializer handling of self.default 2013-03-18 16:05:34 +13:00
Craig de Stigter
d6d5b1d82a allow default values in writable serializer fields 2013-03-18 14:50:21 +13:00
Craig de Stigter
c8416df0c4 accept all WritableField kwargs for writable serializers (eg required=True) 2013-03-18 14:27:15 +13:00
Tom Christie
66bdd608e1 Fixes to save_object 2013-03-16 07:35:44 +00:00
Tom Christie
3ff103ad04 Fixes to save_object 2013-03-16 07:35:27 +00:00
Tom Christie
ccf551201f Clean up and comment restore_object 2013-03-16 07:32:50 +00:00
Tom Christie
56653111a6 Remove unneeded arguments to save_object 2013-03-15 19:57:57 +00:00
Tom Christie
32e0e5e18c Remove erronous _delete attribute 2013-03-15 19:55:32 +00:00
Tom Christie
47492e3ef4 Clean out ModelSerializer special casing from Serializer.field_from_native 2013-03-15 19:22:31 +00:00
Tom Christie
fb3b57803f one 2 one nested relationships 2013-03-15 19:17:54 +00:00
Mark Aaron Shirley
3006e3825f One-to-one writable, nested serializer support 2013-03-14 15:17:13 -07:00
Tom Christie
acc8c1faa4 force_insert, force_update arguments. Closes #484.
Confirmed by `assertNumQueries(…)` in tests.
2013-03-13 20:40:39 +00:00
Tom Christie
2f1951910f Descriptive text for NestedValidationError 2013-03-12 18:35:20 +00:00
Tom Christie
6b4bb48dd4 Initial support for writable nested serialization (Not ModelSerializer) 2013-03-12 13:33:02 +00:00
Mjumbe Wawatu Ukweli
bdcecf48e3 Simplify inherited child check to not use isinstance 2013-03-11 16:01:19 -04:00
Mjumbe Wawatu Ukweli
e7e470739f Use parent's primary key when model is derived via multitable inheritance 2013-03-11 03:23:44 -04:00
Tom Christie
239758e034 Serializers support bulk create. 2013-03-09 10:21:53 +00:00
Tom Christie
28ae26466e Py3k fixes. 2013-03-08 22:43:46 +00:00
Tom Christie
68683b2ea2 Tweak implementation, and use FormSet style errors 2013-03-08 22:19:09 +00:00
Ian Dash
66605acaf0 Errors during deserializing lists now return a list of tuples with
index of bad item in data plus usual errors dict
2013-03-08 15:08:05 +00:00
Tom Christie
183d3ec6a4 Move ModelSerializer field_mapping into an attribute for easier overriding. 2013-02-28 13:41:42 +00:00
Danilo Bargen
e476dcb8c7 Changed AttributeError to AssertionError 2013-02-26 09:38:57 +01:00
Danilo Bargen
ec4d79bcaf Show class name in exception message 2013-02-25 23:02:42 +01:00
Danilo Bargen
3e6f99e273 Improved exception message for missing serializer model meta option 2013-02-25 22:34:05 +01:00