Commit Graph

453 Commits

Author SHA1 Message Date
Tom Christie
11efde8905 Merge pull request #2373 from jakul/document-translations-3.1
Document how to translate DRF error messages (version 3.1)
2015-01-09 11:57:02 +00:00
Craig Blaszczyk
58ec7669ae swap backticks for double quotes 2015-01-07 18:22:30 +00:00
Craig Blaszczyk
91e316f781 prefer single quotes in source and double quotes in user visible strings; add some missing full stops to user visible strings 2015-01-07 12:46:23 +00:00
Craig Blaszczyk
4c32083b8b use double quotes for user visible strings; end user visible strings in full stops; add some missing translation tags 2015-01-07 12:01:11 +00:00
Tom Christie
949e3b7507 Merge branch 'master' into version-3.1 2015-01-05 15:04:23 +00:00
Tom Christie
6fd33ddea9 Udpate docstring 2015-01-05 15:04:01 +00:00
Tom Christie
49dc037a96 Update docstring 2015-01-05 15:03:09 +00:00
Tom Christie
b6ca7248eb required=False allows omission of value for output. Closes #2342 2015-01-05 14:32:12 +00:00
Tom Christie
2a1485e009 Final bits of docs for ModelSerializer fields API 2014-12-19 21:32:43 +00:00
Tom Christie
62f78dfbf1 Copy validators lists on instantiation. 2014-12-19 15:50:29 +00:00
Tom Christie
75e81b8254 build_*_field methods 2014-12-19 15:35:52 +00:00
Tom Christie
f72928ea98 build_field, build_final_kwargs 2014-12-19 15:09:57 +00:00
Tom Christie
94883ae7cd Merge branch 'version-3.1' into model-serializer-api 2014-12-19 14:53:21 +00:00
Tom Christie
80bacc5fb0 depth should reduce by one on each nesting level. Closes #2287. 2014-12-19 14:52:53 +00:00
Tom Christie
4a112fc3a6 Clean up 2014-12-19 14:51:45 +00:00
Tom Christie
caa1318124 get_uniqueness_field_options first pass 2014-12-19 13:13:20 +00:00
Tom Christie
1a84943a00 get_extra_kwargs 2014-12-19 12:27:50 +00:00
Tom Christie
6d907cde9a get_field_names, get_default_field_names 2014-12-19 12:18:40 +00:00
Tom Christie
ba753a7536 Merge branch 'version-3.1' into model-serializer-api 2014-12-19 11:53:26 +00:00
Tom Christie
5830f7e138 get_unique_together_validators and get_unique_for_date_validators 2014-12-19 10:15:36 +00:00
Tymur Maryokhin
d60ecfc498 Assert fields in exclude are model fields 2014-12-18 16:03:15 +01:00
Tom Christie
c6137bbf5a Serializer API restrictions. 2014-12-17 14:14:51 +00:00
Tom Christie
72e08a3e8b Use unicode internally everywhere for 'repr' 2014-12-15 11:55:17 +00:00
Tom Christie
c0b9115bec Improve check for nested writes 2014-12-13 14:17:24 +00:00
J. Iván Alegre
428630c197 Fix trailing space 2014-12-10 10:13:15 +01:00
J. Iván Alegre
9161e5a927 Remove unnecessary hasattr all and add comment for nested relationships 2014-12-10 09:19:27 +01:00
J. Iván Alegre
59470667db Take in care that input data in serializer can be a Manager 2014-12-09 17:49:07 +01:00
Julio Iván Alegre
8d6b0b1f2d Update serializers.py
Treat the input queryset as it comes (maybe it has been changed in a higher level). Evaluating .all() does nothing if or if not is a queryset.
2014-12-09 16:13:18 +01:00
José Padilla
afe7ed9333 Add allow_blank for ChoiceField #2184
This makes a ChoiceField optional in HTML if
model field has `blank=True` set.
2014-12-09 09:25:06 -04:00
Tom Christie
eee02a47d9 Added ListSerializer.validate(). Closes #2168. 2014-12-08 14:56:45 +00:00
Xavier Ordoquy
a257b04928 Fix missing validated_data in raise_errors_on_nested_writes (#2221) 2014-12-07 12:12:40 +01:00
Tom Christie
544967f36e Test tweaks 2014-12-05 14:15:58 +00:00
Tom Christie
c611a2c1fe Merge pull request #2213 from BrickXu/master
Raise error if `fields` on serializer is not a list of strings.
2014-12-05 14:00:59 +00:00
Tom Christie
88900a0844 Minor tweaks 2014-12-05 13:58:39 +00:00
Tom Christie
ca74fa989d Better serializer errors for nested writes. Closes #2202 2014-12-05 13:50:28 +00:00
BrickXu
d68c614504 Add validation for fields & exclude type. 2014-12-05 14:51:39 +08:00
Tymur Maryokhin
d9930181ee Removed unused imports, pep8 fixes, typo fixes 2014-12-05 00:29:28 +01:00
Tom Christie
f221b737a1 Merge pull request #2197 from mtschammer/mtschammer-validated_attrs-rename
Renamed validated_attrs to validated_data to be more in line with other code
2014-12-03 23:01:30 +00:00
Martin Tschammer
ab25d706c7 Renamed validated_attrs to validated_data to be more in line with other similar code. 2014-12-03 23:52:35 +01:00
Tom Christie
e1d98f7756 Improve nested update and create testing. 2014-12-03 22:45:44 +00:00
Tom Christie
f2dd05a6e6 Improved nested update test in update().
Closes #2194.
2014-12-03 22:43:40 +00:00
Tom Christie
76ac641fbd Minor tweaks for helpful message on Model.objects.create() failure. 2014-12-02 13:04:49 +00:00
Tom Christie
54b7b32818 Merge branch 'fixes/2013' of git://github.com/gregmuellegger/django-rest-framework into gregmuellegger-fixes/2013 2014-12-02 12:46:47 +00:00
Tom Christie
79e18a2a06 Raise assertion error if calling .save() on a serializer with errors. Closes #2098. 2014-12-02 09:27:40 +00:00
Tom Christie
270c7acdd7 Minor validtors tweak 2014-12-01 11:59:04 +00:00
Tom Christie
22c5b863bc More descriptive docstring on ModelSerializer 2014-12-01 11:37:38 +00:00
Tom Christie
b9503cd603 Support Django's core ValidationError for backwards compat. Refs #2145. 2014-12-01 10:48:45 +00:00
Tom Christie
d4b8e356b9 Merge branch '3.0-docs' 2014-11-28 09:57:02 +00:00
Tom Christie
34ca8cd2a5 Moar docs. Amazing. 2014-11-28 09:56:44 +00:00
Tom Christie
6b2033f789 Drop transform_<field_name> 2014-11-27 16:40:58 +00:00