Commit Graph

68 Commits

Author SHA1 Message Date
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
Tom Christie
809f5de330 Merge pull request #515 from yprez/blank_fields_issue
Fix for #514
2012-12-29 05:25:43 -08:00
Yuri Prezument
36e1987f59 Regression test for #532 - values overriden by "default" setting 2012-12-25 18:50:00 +02:00
Mark Aaron Shirley
2f5582a1a6 Merge remote-tracking branch 'upstream/master' into related-required 2012-12-19 15:24:22 -08:00
Tom Christie
a493c83248 urls, patterns, include imports move to compat to support incoming 1.3 thru 1.6 import compatability 2012-12-19 23:12:27 +00:00
Yuri Prezument
c13f132a21 Failing test with partial serializer and foreign keys 2012-12-19 09:24:11 -08:00
Yuri Prezument
967f22e7d1 Failing test case for #514
Serializer errors are: {'title': [u'This field is required.']}
2012-12-17 16:50:20 +02:00
Joel Marcotte
01e06bcdf8 Added test for "positive_integer in choices tuple does not get parsed if not string".
Signed-off-by: Joel Marcotte <skaner@gmail.com>
2012-12-15 16:33:08 -05:00
Tom Christie
497da7fc69 Clean up field initialization. Fixes #497 2012-12-12 20:45:06 +00:00
Tom Christie
4058223309 Fix broken nested fields 2012-12-11 21:07:25 +00:00
George Kappel
80f15c598a Added depth test 2012-12-11 09:14:52 -06:00
Marko Tibold
d0935d1fbb get_excluded_fieldnames() should respect Meta options' ability to be either a tuple or list. Fixes #490.
Refactored `if self.opt.fields` out of the for loop.
Updated and cleaned up the validation-tests.
2012-12-10 23:10:04 +01:00
Tom Christie
a5178e9a36 Merge pull request #451 from markotibold/#431
Call model's .full_clean() method, eg. to validate uniqueness
2012-12-07 12:34:56 -08:00
Tom Christie
6ffcd7ba36 Merge pull request #477 from roberts81/master
Fix for #460
2012-12-06 14:54:28 -08:00
Marko Tibold
c65f22e0e4 Merge branch 'master' of https://github.com/tomchristie/django-rest-framework into #431 2012-12-06 23:47:47 +01:00
Ben Roberts
cb7d9ea5c9 cleaned up white space & docstring styling 2012-12-06 12:45:50 -07:00
Ben Roberts
7f28a78414 cleaned up last commit 2012-12-05 17:54:21 -07:00
Ben Roberts
705c7ad09d added tests and fix for unpickleable metadata in SortedDictWithMetadata 2012-12-05 17:43:47 -07:00
Pavel Savchenko
1c1bd3fc5d fix test response 2012-11-30 01:37:21 +02:00
Pavel Savchenko
e311b763e1 add traverse_related feature + tests (fixes issue#461) 2012-11-30 01:34:46 +02:00
Marko Tibold
e7666014a8 Added an assertion to the tests that checks the '.errors' value for the unique-test 2012-11-26 23:39:49 +01:00
Marko Tibold
3f47f6cea9 Added a validate_unique test. 2012-11-22 23:50:42 +01:00
Marko Tibold
ca5b99486d Added _post_clean() behaviour by adding a .perform_model_validation() method.
Fixed some tests that were failing due to extra strict validation.
2012-11-22 22:36:37 +01:00
Mark Aaron Shirley
0876bed963 Merge remote-tracking branch 'upstream/master' into partial-update 2012-11-21 09:37:22 -08:00
Stephan Groß
6ba4df8a27 Merge remote-tracking branch 'upstream/master' into regex_field
Conflicts:
	docs/topics/release-notes.md
2012-11-21 11:56:34 +01:00
Stephan Groß
ed713d0354 added tests 2012-11-21 11:07:08 +01:00
Tom Christie
8e8b23b6a9 Merge pull request #430 from j4mie/serializer-method-field
Serializer method field
2012-11-20 15:30:30 -08:00
Mark Aaron Shirley
c3644234cd Add support for partial serializer updates 2012-11-20 11:01:21 -08:00
Jamie Matthews
3cc5349b2f Clean up and clarify tests for related serializers 2012-11-20 09:49:54 +00:00
Jamie Matthews
68c397371c Fix related serializers with source argument that resolves to a callable 2012-11-20 09:41:36 +00:00
Jamie Matthews
de5b071d67 Add SerializerMethodField 2012-11-19 17:22:17 +00:00
Jacob Magnusson
d67ee708e5 Add support for min_length / max_length keywords
on basic ModelFields
2012-11-18 18:14:21 +01:00
Marko Tibold
1a436dd6d9 Added URLField and SlugField.
Fixed test_modelserializer_max_length_exceeded
2012-11-16 22:43:16 +01:00
Marko Tibold
4edc801d59 Reproduces #421 2012-11-16 21:42:04 +01:00
Tom Christie
e224061189 Support for read_only_fields on ModelSerializer classes 2012-11-09 17:01:20 +00:00
Tom Christie
b7b942c599 Swap position of instance and data keyword arguments. 2012-11-05 10:53:20 +00:00
Jacob Magnusson
38af6107b5 Added test for ModelSerializer Meta fields
returning as expected
2012-11-03 00:32:08 +01:00
Jacob Magnusson
1b49615c00 Added test that makes sure that fields with
dictionaries as data are returned as expected and
not turned into string representations
2012-11-03 00:32:02 +01:00
Jacob Magnusson
19a218f859 Bye bye star import 2012-11-03 00:27:56 +01:00
Tom Christie
0047a46020 Merge fixes for 'blank=True' fields. Fixes #324, Fixes #325
Thanks to @Roarster.
2012-10-30 11:03:03 +00:00
Marko Tibold
6ccbdd10ad Adding failing tests that show null=True model fields are won't validate if their value is omitted. 2012-10-30 00:03:24 +01:00
Tom Christie
6e4ab09aae readonly -> read_only 2012-10-28 20:21:45 +00:00
Tom Christie
67f1265e49 Fix failing 'default' on ModelSerializer 2012-10-26 13:20:30 +01:00