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
Tom Christie
e1f0001f92
Fix and test for #645
...
Yuck, pickle is weird. Closes #645 .
2013-02-22 23:00:07 +00:00
Tom Christie
bba918fb2a
Fix and test case for #653
...
Closes #653
2013-02-22 22:13:06 +00:00
Tom Christie
bc87bf13b4
Tests and fix for #666 .
...
Closes #666 .
2013-02-22 22:02:42 +00:00
Andreas Pelme
5a5df18d18
Added a serializer TimeField
2013-02-14 21:19:51 +01:00
Tom Christie
24ed0fa4b9
Drop accidental (uneeded) validation logic.
2013-02-14 12:26:02 +00:00
Tom Christie
7f797abc19
Remove deprecated APIs from tests
2013-02-12 20:07:35 +00:00
Tom Christie
388e617366
Raise warnings on implicit many serialization
2013-02-12 13:53:45 +00:00
Tom Christie
aa03425c09
Merge pull request #651 from fernandogrd/master
...
DictWithMetadata.__getstate__ was never called (Fix for 645)
2013-02-11 23:27:35 -08:00
Fernando Rocha
ea004b5e7a
Make use o issubclass instead of isinstance (fix issue #645 )
...
Because __mro__ is a list of classes and not instances.
DictWithMetadata.__getstate__ was never called
Signed-off-by: Fernando Rocha <fernandogrd@gmail.com>
2013-02-11 19:18:22 -03:00
Tom Christie
670ac25b25
Allow serializers to handle dicts as well as objects. Fixes #447 .
2013-02-07 12:57:40 +00:00
Tom Christie
8113d66126
Use new style of required=<bool>
not blank
or null
2013-02-07 09:24:34 +00:00
Tom Christie
5813a09512
Use new many=True relations style.
2013-02-07 09:14:58 +00:00
Tom Christie
efb798cebc
Don't deprecate 'exclude'
...
Need to track outcome of Django's #19733 , and decide on approach
accordingly.
2013-02-06 08:48:41 +00:00
Tom Christie
7dc4bce4e2
Fix 2.6 compat
2013-02-04 21:35:47 +00:00
Tom Christie
b052c92ac3
Cleanup imports
...
Mostly adding `from __future__ import unicode_literals` everywhere.
2013-02-04 20:55:35 +00:00
Tom Christie
8e846bdf52
Merge branch 'py3k' into 2.2
...
Conflicts:
rest_framework/relations.py
rest_framework/serializers.py
rest_framework/tests/relations_hyperlink.py
rest_framework/tests/relations_slug.py
2013-02-04 20:37:09 +00:00
Tom Christie
f4f237e3ee
3.2, 3.3 compat
2013-02-01 14:03:28 +00:00
Tom Christie
d9c7b1c585
Merge branch 'p3k' of https://github.com/linovia/django-rest-framework into working
...
Conflicts:
rest_framework/authentication.py
rest_framework/relations.py
rest_framework/serializers.py
rest_framework/settings.py
rest_framework/tests/authentication.py
rest_framework/tests/genericrelations.py
rest_framework/tests/generics.py
rest_framework/tests/relations_hyperlink.py
rest_framework/tests/relations_nested.py
rest_framework/tests/relations_pk.py
rest_framework/tests/serializer.py
2013-02-01 11:58:55 +00:00
Tom Christie
d9b73e15c8
Serializers take many=<bool>
argument.
2013-01-31 17:06:23 +00:00
Tom Christie
f1e665673f
Tidying
2013-01-30 20:38:11 +00:00
Tom Christie
be6df3ae3c
Merge branch 'master' into many-fields
...
Conflicts:
rest_framework/relations.py
2013-01-30 13:41:56 +00:00
Andrea de Marco
85e6360792
Update rest_framework/serializers.py
2013-01-28 22:08:40 +01:00