Tom Christie
72e08a3e8b
Use unicode internally everywhere for 'repr'
2014-12-15 11:55:17 +00:00
Tom Christie
8934e61b67
Merge branch 'jpadilla-exception-handler-context' into version-3.1
2014-12-15 09:20:27 +00:00
Tom Christie
4778463e32
Merge branch 'master' into version-3.1
2014-12-15 09:18:11 +00:00
Tom Christie
5e7c9687c7
First pass at serializer repr bug
2014-12-15 09:13:02 +00:00
Tom Christie
4fb757146a
Fix test for python2/3 compat
2014-12-13 15:04:39 +00:00
Tom Christie
aa571abb20
Better errors when serializer has incorrectly named field.
2014-12-13 14:58:04 +00:00
Tom Christie
baaa356489
Merge master
2014-12-12 15:37:43 +00:00
Tom Christie
8825b258ca
Clean up import ordering
2014-12-12 13:22:24 +00:00
Tom Christie
e3b16c8bc6
Python 3 test fix
2014-12-12 13:16:18 +00:00
Tom Christie
78312d44d1
Client.logout() also clears any force_authenticate
2014-12-12 13:13:08 +00:00
Martin Maillard
dbd057b9a9
Add test
2014-12-11 20:20:46 +01:00
Tom Christie
ca7b1f6d51
Optimizations play nicely with select_related, prefetch_related
2014-12-10 21:09:45 +00:00
Tom Christie
720a37d3de
Hyperlinked PK optimization. Closes #1872 .
2014-12-09 17:28:56 +00:00
Tom Christie
8933bc4b14
Merge branch 'validator-pollution' of git://github.com/mhsparks/django-rest-framework into mhsparks-validator-pollution
2014-12-09 16:23:33 +00: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
Victor Cabral
0c0d65d232
Fixed unit test for auth login
2014-12-08 09:06:52 +07: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
65d6cba75f
Merge pull request #2200 from maryokhin/master
...
Clean up compat code
2014-12-05 13:14:14 +00:00
Tom Christie
de4ef6e394
Merge pull request #2195 from tomchristie/tomchristie-escape-u2028-u2029-json
...
Escape \u2028 and \u2029 in JSON output.
2014-12-05 12:35:24 +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
Tymur Maryokhin
d54c67d79d
Removed custom StringIO, force_text, smart_text compat
2014-12-04 03:11:42 +01:00
Tymur Maryokhin
09e59f2686
Removed custom python_2_unicode_compatible. Closes #2183
2014-12-04 02:50:25 +01:00
Tom Christie
3d6620c72a
Merge
2014-12-03 23:24:06 +00:00
Tom Christie
f74e52b31e
Merge
2014-12-03 23:14:58 +00:00
Tom Christie
6369f92125
Merge
2014-12-03 23:12:52 +00:00
Tom Christie
23fa6e54ce
Escape \u2028 and \u2029 in JSON output.
...
Closes #2169 .
2014-12-03 22:33:34 +00:00
Mark Hughes
55528addf9
Added test to show potential issue with UniqueValidator being added to the underlying Django model.
2014-12-03 12:30:15 +00:00
Tom Christie
c5a2d501e5
Merge pull request #2175 from BrickXu/fix_2171
...
Not allow to pass an empty actions to viewset.as_view()
2014-12-03 08:53:04 +00:00
Tom Christie
0359e9250d
FileUploadParser. Raising StopFutureHandlers removes any handlers not yet run for the active set. Closes #2109 .
2014-12-02 13:52:46 +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
BrickXu
53f52765fc
Not allow to pass an empty actions to viewset.as_view(). Refs issue #2171
2014-12-02 17:07:55 +08:00
Tymur Maryokhin
e2ea98e8ab
Fixed typos
2014-11-29 20:23:55 +01:00
Tymur Maryokhin
dd9d40d8c0
Moved non-conflicting models
2014-11-29 20:04:50 +01:00
José Padilla
7f9dc73672
Remove XML support from core
2014-11-29 14:57:51 -04:00
José Padilla
fe745b9616
Remove JSONP support from core
2014-11-29 14:55:33 -04:00
Tymur Maryokhin
2f03483f96
Removed unused models
2014-11-29 19:45:26 +01:00
José Padilla
731c8421af
Remove YAML support from core
2014-11-29 14:43:05 -04:00
José Padilla
0cc990792c
Merge branch 'version-3.1' into oauth_as_package
...
Conflicts:
requirements-test.txt
rest_framework/compat.py
tests/settings.py
tox.ini
2014-11-28 12:14:40 -04:00
Tom Christie
3a5b3772fe
Use ImproperlyConfigured when model meta lookup fails
2014-11-28 15:36:04 +00:00
Tom Christie
6fbd23ab34
Merge pull request #2086 from beck/doug/blow-up-with-bad-models
...
Ensure _resolve_model does not return None
2014-11-28 15:31:51 +00:00
Tom Christie
8d989bb16d
Merge pull request #2143 from linovia/bugfix/1850
...
Bugfix for #1850
2014-11-28 15:01:56 +00:00
Tom Christie
c8764de788
Drop defunct tests
2014-11-28 13:04:42 +00:00
Xavier Ordoquy
767414439b
Be nicer with __closable_objects.
2014-11-26 22:20:14 +01:00
Xavier Ordoquy
f5e5ed0077
Merge remote-tracking branch 'reference/master' into bugfix/1850
2014-11-26 16:36:56 +01:00
José Padilla
653d626b3c
Fix failing YAML tests
2014-11-25 11:33:18 -04:00
Tom Christie
9c58dfec4e
Fix shoddy test case
2014-11-25 10:34:21 +00:00
Tom Christie
8586290df8
Apply defaults and requiredness to unique_together fields. Closes #2092 .
2014-11-19 13:55:10 +00:00
Tom Christie
e49d22dbda
Allow blank choices to render. Closes #2071 .
2014-11-19 09:31:26 +00:00
Doug Beck
67735687b2
Ensure _resolve_model
does not return None
2014-11-18 01:26:23 -05:00
Gregor Müllegger
ad060aa360
More helpful error message when default .create
fails. Closes #2013 .
2014-11-15 15:29:52 +01:00
Eleni Lixourioti
1aa7783095
Merge branch 'version-3.1' of github.com:tomchristie/django-rest-framework into oauth_as_package
...
Conflicts:
.travis.yml
2014-11-15 14:27:41 +00:00
Tom Christie
ea98de9b88
Model fields with .blank or .null now map to required=False. Closes #2017 . Closes #2021 .
2014-11-13 19:28:57 +00:00
Tom Christie
9e75c4d8ea
Reinstate OPTIONS tests
2014-11-13 16:24:03 +00:00
Tom Christie
502a86cedb
Remove tests/settings. Using conftest instead.
2014-11-13 16:10:48 +00:00
Tom Christie
e5cd693e7b
Remove test cruft
2014-11-13 16:07:25 +00:00
Tom Christie
f387cd89da
Uniqueness constraints imply a forced 'required=True'. Refs #1945
2014-11-10 12:21:27 +00:00
Tom Christie
db1dd8e240
Tests & fixes for list serialization
2014-11-06 17:32:33 +00:00
Tom Christie
9923a6ce90
Fix tests for py2/3 compat
2014-11-06 11:51:10 +00:00
Tom Christie
ed541864e6
Support for bulk create. Closes #1965 .
2014-11-06 10:34:59 +00:00
Tom Christie
0a5d088287
Fix failing copy of fields when RegexValidator is used. Closes #1954 .
2014-11-05 10:48:30 +00:00
Tom Christie
2b535954cd
Py2/3 compat for validation test
2014-11-03 14:14:12 +00:00
Tom Christie
003c42b0f5
Use invalid_data key for error message. Closes #2002 .
2014-11-03 14:01:02 +00:00
tanwanirahul
ea8c405201
Tests for validating custom_method_name router attribute
2014-11-03 14:44:47 +01:00
Tom Christie
65a0d083d6
Merge pull request #1963 from carljm/lazy-fields
...
Set up serializer fields lazily on-demand.
2014-10-31 16:40:06 +00:00
Tom Christie
207208fedf
Lazy loading of fields and validators. Closes #1963 .
2014-10-31 16:38:39 +00:00
Tom Christie
11075d3770
Merge branch 'master' into version-3.0
2014-10-31 16:05:45 +00:00
Tom Christie
0dea509dc9
Nested serializer tests
2014-10-30 15:59:16 +00:00
Tom Christie
9ebaabd6eb
unique_for_date/unique_for_month/unique_for_year
2014-10-28 16:21:49 +00:00
Tom Christie
ae53fdff9c
First pass at unique_for_date, unique_for_month, unique_for_year
2014-10-22 13:30:28 +01:00
Tom Christie
c5d1be8eac
.validate() can raise field errors or non-field errors
2014-10-22 10:32:32 +01:00
Carl Meyer
140f8620ae
Set up serializer fields lazily on-demand.
...
This avoids AppRegistryNotReady problems in Django 1.7 with nested serializers,
which are instantiated at import time, possibly before Django's app registry is
fully populated.
2014-10-17 09:50:57 -06:00
Tom Christie
05cbec9dd7
Use serializers.ValidationError
2014-10-17 13:23:14 +01:00
Tom Christie
3af5df1955
Performance for PK fields
2014-10-16 20:47:57 +01:00
Tom Christie
d9a199ca0d
exceptions.ValidationFailed, not Django's ValidationError
2014-10-10 14:16:09 +01:00
Tom Christie
5d247a65c8
First pass on nested serializers in HTML
2014-10-09 15:11:19 +01:00
Tom Christie
5f4cc52ef5
Tweaking
2014-10-09 10:11:44 +01:00
Tom Christie
5ead8dc89d
Support empty file fields
2014-10-08 16:59:52 +01:00
Tom Christie
af0f01c5b6
Move generic relation tests
2014-10-08 11:23:40 +01:00
Tom Christie
6b09e5f2bb
Tests for generic relationships
2014-10-08 11:22:10 +01:00
Tom Christie
093febb912
Tests for relational fields
2014-10-08 11:04:08 +01:00
Xavier Ordoquy
311d315a73
Reverted 59d0a0387d
and fixed the tests
2014-10-08 08:33:28 +02:00
Tom Christie
6bfed6f852
Enforce uniqueness validation for relational fields
2014-10-07 17:04:53 +01:00
Jones Chi
2dfe75c23a
Fix follow does not work on APIClient
...
Handle follow just like Django's Client.
2014-10-06 15:10:35 +08:00
Craig de Stigter
857a8486b1
More spelling tweaks
2014-10-03 09:00:33 +13:00
Craig de Stigter
dfab9af294
Minor: fix spelling and grammar, mostly in 3.0 announcement
2014-10-03 08:41:18 +13:00
Tom Christie
c171fa21ac
First pass at HTML form rendering
2014-10-01 19:44:46 +01:00
Tom Christie
d1b2c8ac7f
Absolute URLs for file fields
2014-09-29 14:12:26 +01:00
Tom Christie
4798df52df
Update release notes
2014-09-29 12:57:05 +01:00
Tom Christie
9805a085fb
UniqueTogetherValidator
2014-09-29 11:23:02 +01:00
Tom Christie
43fd5a8730
Uniqueness validation
2014-09-29 09:24:03 +01:00
Tom Christie
dee3f78cb6
FileField and ImageField
2014-09-26 17:06:20 +01:00
Tom Christie
8be4496586
Drop erronous print statements
2014-09-26 13:59:37 +01:00
Tom Christie
2e87de0143
Added ListField
2014-09-26 13:08:20 +01:00
Tom Christie
8b8623c5f8
Allow many, partial and context in BaseSerializer
2014-09-26 12:48:20 +01:00
Tom Christie
2859eaf524
request.data attribute
2014-09-26 10:46:52 +01:00
Tom Christie
417fe1b675
Partial support
2014-09-25 13:37:26 +01:00
Tom Christie
8ee92f8a18
Refuse to downcast from datetime to date or time
2014-09-25 13:10:33 +01:00
Tom Christie
b47ca158b9
Check for redundant on SerializerMethodField
2014-09-25 12:09:12 +01:00
Tom Christie
64632da371
Clean up bind - no longer needs to be called multiple times in nested fields
2014-09-25 11:40:32 +01:00
Tom Christie
1420c76453
Ensure proper sorting of 'choices' attribute on ChoiceField
2014-09-25 10:49:25 +01:00
Tom Christie
fb1546ee50
Enforce field_name != source
2014-09-24 20:53:37 +01:00
Tom Christie
358445c174
Drop redundant OPTIONS tests
2014-09-24 14:52:34 +01:00
Tom Christie
f4b1dcb167
OPTIONS support
2014-09-24 14:09:49 +01:00
José Padilla
90139b3efc
Remove left unicode strings
2014-09-23 21:18:56 -04:00
José Padilla
e8c01ecdab
Correctly propagate cloned_request for OPTIONS
...
Update to fix pending changes in #1507
2014-09-23 21:12:58 -04:00
Tom Christie
0404f09a7e
NullBooleanField
2014-09-23 14:30:17 +01:00
Tom Christie
f22d0afc3d
Tests for field choices
2014-09-23 14:15:00 +01:00
Tom Christie
5d80f7f932
allow_blank, allow_null
2014-09-22 17:46:02 +01:00
Tom Christie
5a95baf2a2
Tests & tweaks for ChoiceField
2014-09-22 16:52:57 +01:00
Tom Christie
b5454dd022
Tests and tweaks for choice fields
2014-09-22 16:50:04 +01:00
Tom Christie
e5f0a97595
More compat fixes
2014-09-22 16:45:06 +01:00
Tom Christie
5586b6581d
Support format=None for date/time fields
2014-09-22 16:02:59 +01:00
Tom Christie
4db23cae21
Tweaks to DecimalField
2014-09-22 15:34:06 +01:00
Tom Christie
249253a144
Fix compat issues
2014-09-22 14:54:33 +01:00
Tom Christie
afb3f8ab0a
Tests and tweaks for text fields
2014-09-22 13:26:47 +01:00
Tom Christie
af46fd6b00
Field tests and associated cleanup
2014-09-22 12:25:57 +01:00
Tom Christie
cf72b9a8b7
Moar tests
2014-09-19 16:43:13 +01:00
Tom Christie
b361c54c5c
Test rejigging
2014-09-19 15:46:32 +01:00
Tom Christie
88008c0a68
Merge branch 'master' into version-3.0
2014-09-19 14:05:50 +01:00
Tom Christie
12ccb0fe8a
Test tweaking
2014-09-19 09:09:26 +01:00
Tom Christie
f90049316a
Added a model update integration test
2014-09-18 15:47:27 +01:00
Tom Christie
106362b437
ModelSerializer.create() to handle many to many by default
2014-09-18 14:58:08 +01:00
Tom Christie
9fdb2280d1
First pass on ManyRelation
2014-09-18 14:23:00 +01:00
Tom Christie
3bc628edc0
Test for custom fields
2014-09-18 13:07:38 +01:00
Tom Christie
87734be5f4
Configuration correctness tests on ModelSerializer
2014-09-18 12:17:21 +01:00
Tom Christie
5b7e4af0d6
get_base_field() refactor
2014-09-18 11:20:56 +01:00
Tom Christie
c0155fd9dc
Update comments
2014-09-17 14:11:53 +01:00
Tom Christie
4ddc661b01
Tests for through relationships
2014-09-15 14:05:58 +01:00
Tom Christie
d196608d5a
Fix nested model serializer base class
2014-09-15 13:55:09 +01:00
Tom Christie
0c15b97b33
Tests for reverse relationships
2014-09-15 13:48:03 +01:00
Tom Christie
c1e2a9cba6
Clean up field mapping tests
2014-09-15 13:38:28 +01:00
Tom Christie
3cf7ed10d2
Fix erronous import
2014-09-15 13:10:58 +01:00
Tom Christie
40dc588a37
Drop label from serializer fields when not needed
2014-09-15 09:50:51 +01:00
Tom Christie
afb28a44ad
Dealing with reverse relationships
2014-09-12 21:32:20 +01:00
Tom Christie
1f75ffc791
Access validation messages in a way thats compatible with 1.4, 1.5
2014-09-12 19:50:30 +01:00
Tom Christie
b73a205cc0
Tests for relational fields (not including many=True)
2014-09-12 17:03:42 +01:00
Tom Christie
79715f01f8
Coerce dates etc to ISO_8601 in seralizer, by default.
2014-09-12 12:10:22 +01:00
Tom Christie
5e39e159ee
UNICODE_JSON and COMPACT_JSON settings
2014-09-12 11:38:22 +01:00
Tom Christie
250755def7
Clean up relational fields queryset usage
2014-09-12 10:59:51 +01:00
Tom Christie
0d354e8f92
to_internal_value() and to_representation()
2014-09-12 09:49:35 +01:00
Tom Christie
adcb64ab41
MethodField -> SerializerMethodField
2014-09-12 09:12:56 +01:00
Tom Christie
040bfcc09c
NotImplemented stubs for Field, and DecimalField improvements
2014-09-11 21:48:54 +01:00
Tom Christie
19b8f779de
Throttles now use Retry-After header and no longer support the custom style
2014-09-11 20:43:44 +01:00
Tom Christie
bf52d04f4c
Nice manager representations on serializer classes
2014-09-11 20:37:27 +01:00
Tom Christie
de301f3b66
Merge master
2014-09-11 13:20:44 +01:00
Marek Skrajnowski
ae84438530
Added DefaultRouter support (and test) for viewsets without the default action implemented, which is usually the list action.
2014-09-11 12:42:36 +02:00