Tom Christie
6d425aa3be
Merge pull request #831 from brianz/master
...
Allow nested fields to be missing
2013-05-18 04:36:00 -07:00
Pablo Recio
8fe43236a2
Moved test model into closer to the testcase
2013-05-18 13:23:38 +02:00
Pablo Recio
53a8004401
Merge branch 'master' into 725-blank-choice-dash
...
Conflicts:
rest_framework/tests/fields.py
2013-05-18 12:51:40 +02:00
Pablo Recio
ab8bd566f9
Adding BLANK_CHOICE_DASH
as a choice if the model's field isn't required
2013-05-18 12:41:52 +02:00
Craig de Stigter
0cd7c80e6e
add tests for related field source for RelatedField and PrimaryKeyRelatedField. #694
2013-05-18 12:16:30 +02:00
Tom Christie
af88a5b175
Test and fix which closes #652 .
2013-05-15 14:25:25 +01:00
Brian Zambrano
24c9c455fe
Allow for missing non-required nested objects.
...
Serializer fields which are themselves serializers should not be required.
Specifically, if a nested object is set to "required=False", it should be
possible to serialize the main object and have the sub-object set to None/null.
2013-05-13 14:41:12 -07:00
Tom Christie
22af28d146
Merge master
2013-04-30 19:32:34 +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
3b0fa3ebaa
Changed DepthTest to have depth=2
2013-04-27 13:10:39 -07:00
Tom Christie
76e039d70e
First pass on automatically including reverse relationship
2013-04-10 22:38:02 +01:00
Tom Christie
870d5c7d78
Merge pull request #744 from tomchristie/basic-bulk-edit
...
Basic bulk create and bulk update
2013-03-22 14:47:29 -07:00
Tom Christie
b4210f9a56
Test moved out of serializer.py into serializer_bulk_update
2013-03-22 12:46:03 +00:00
Tom Christie
8adde506e8
Default date/time fields now return python date/time objects again by default
2013-03-21 08:41:54 +00:00
Tom Christie
b2dc664485
Basic bulk create and bulk update
2013-03-19 14:26:48 +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
Stephan Groß
f208d8d2bb
Add drf settings + output format + testcases
2013-03-01 16:50:18 +01:00
Tom Christie
a1dbd93f54
assertEquals
-> assertEqual
2013-02-27 21:15:00 +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
9f98455362
Formatting
2013-02-22 23:00:07 +00:00
Yuri Prezument
8fa82822a0
Add assertion in test
2013-02-21 15:39:14 +02:00
Yuri Prezument
1b4c078db2
Failing test case for #669
2013-02-21 12:22:09 +02:00
Tom Christie
f341ead499
Test for None in 'dotted.source' component.
...
Closes #643 .
2013-02-12 23:01:20 +00:00
Tom Christie
15fa42b647
Unicode literal fix
2013-02-12 23:00:43 +00:00
Tom Christie
724906c516
Test for #637 .
2013-02-12 22:58:38 +00:00
Tom Christie
7f797abc19
Remove deprecated APIs from tests
2013-02-12 20:07:35 +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
937ef00808
Merge branch 'master' into 2.2
2013-02-04 21:19:11 +00:00
Tom Christie
221e77d357
Fix incorrect test name. Fixes #635
2013-02-04 21:18:54 +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
be6df3ae3c
Merge branch 'master' into many-fields
...
Conflicts:
rest_framework/relations.py
2013-01-30 13:41:56 +00:00
Tom Christie
a3a06d11cc
Ensure model field validation is performed for ModelSerializers with a custom restore_object method. Fixes #623 .
2013-01-28 12:56:42 +00:00
Tom Christie
b5d8f50f9d
Merge branch 'master' into many-fields
2013-01-26 21:37:43 +00:00
Stephan Groß
f0071dbccd
Add separate test for failed custom validation
2013-01-23 07:52:56 +01:00
Stephan Groß
dc1c57d595
Add failed testcase for fieldvalidation
2013-01-21 12:45:30 +01:00
Tom Christie
4eb5861f36
Starting migration from ManyField to Field(many=True)
2013-01-18 23:36:35 +00:00
Tom Christie
26f9acb45a
Validation errors instead of exceptions when serializers receive incorrect types. Fixes #402 .
2013-01-04 14:11:05 +00:00
Tom Christie
6da21fa796
Merge pull request #541 from yprez/default_and_partial_serializers2
...
Fix "default" values and partial serializers. Fixes #532 .
2013-01-03 14:05:36 -08:00