Commit Graph

299 Commits

Author SHA1 Message Date
Tom Christie
43d983fae8 Add paging controls 2015-01-22 17:25:12 +00:00
Tom Christie
0822c9e558 Cursor pagination now works with OrderingFilter 2015-01-22 16:12:05 +00:00
Tom Christie
408261ee02 Support ordering attribute either on view or on pagination class for CursorPagination 2015-01-22 15:15:52 +00:00
Tom Christie
83a82b44a5 Support for tuple ordering in cursor pagination 2015-01-22 15:07:01 +00:00
Tom Christie
94b5f7a86e Tidy up cursor tests and make more comprehensive 2015-01-22 12:14:52 +00:00
Tom Christie
f1af603fb0 Tests for reverse pagination 2015-01-22 10:51:04 +00:00
Tom Christie
cae9528c54 Add support for reverse cursors 2015-01-22 10:28:19 +00:00
Tom Christie
5e52f0fd8c Merge branch 'version-3.1' into cursor-pagination 2015-01-21 20:29:58 +00:00
Tom Christie
e59b3d1718 Make ReturnDict cachable. Closes #2360. 2015-01-21 14:18:13 +00:00
Tom Christie
9ec08ce578 Merge master 2015-01-21 13:12:14 +00:00
Tom Christie
da6ef3d0b0 Allow missing fields option for inherited serializers. Closes #2388. 2015-01-21 13:03:37 +00:00
Tom Christie
e5b94f7b7b Merge branch 'version-3.1' into cursor-pagination 2015-01-19 15:23:08 +00:00
Tom Christie
6065cdbd93 Merge master 2015-01-19 15:16:57 +00:00
Tom Christie
4f3c3a06cf Drop trailing whitespace on indented JSON output. Closes #2429. 2015-01-19 14:41:10 +00:00
Tom Christie
dbb684117f Add offset support for cursor pagination 2015-01-19 09:24:42 +00:00
David Muller
b5128ca574 Save objects before assigning them in InheritedModelSerializationTests; Django 1.8 now throws an error when assigning unsaved objects to Foreign Key, GenericForeignKey, and OneToOneFields 2015-01-18 15:19:11 -08:00
Tom Christie
4919492582 First pass at cursor pagination 2015-01-17 00:10:43 +00:00
Tom Christie
86d2774cf3 Fix compat issues 2015-01-16 20:30:46 +00:00
Tom Christie
8b0f25aa0a More pagination tests & cleanup 2015-01-16 16:55:46 +00:00
Tom Christie
50db8c092a Minor test cleanup 2015-01-16 16:55:28 +00:00
Tom Christie
53edd37df5 Tests for LimitOffsetPagination 2015-01-15 21:07:05 +00:00
Tom Christie
73feaf6299 First pass at 3.1 pagination API 2015-01-09 15:30:36 +00:00
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
7f8d314101 update tests to expect new error messages 2015-01-08 17:16:47 +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
Tom Christie
949e3b7507 Merge branch 'master' into version-3.1 2015-01-05 15:04:23 +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
6168f60ba8 Merge branch 'master' into version-3.1 2015-01-05 11:02:28 +00:00
Craig Blaszczyk
32506e2075 update expected error messages in tests 2015-01-02 11:08:39 +00:00
Tom Christie
efa5942ce1 Support namespaced router URLs with DefaultRouter. 2014-12-28 12:02:52 +00:00
Tom Christie
67fc002f91 Drop unused import 2014-12-28 11:27:06 +00:00
Tom Christie
7b42c5ed17 Remove broken test. Closes #2359. 2014-12-28 11:14:32 +00:00
Remi Paulmier
b32ecdefba modified the tests accordingly 2014-12-24 14:07:28 +01:00
Tom Christie
ffb8d568e0 Merge pull request #2330 from tomchristie/better-blank-html-behavior
Better behavior with null and '' for blank HTML fields.
2014-12-20 16:40:27 +00:00
Tom Christie
77e3021fea Better behaviour with null and '' for blank HTML fields. 2014-12-20 16:26:51 +00:00
Tom Christie
2a1485e009 Final bits of docs for ModelSerializer fields API 2014-12-19 21:32:43 +00:00
Tom Christie
d109ae0a2e Merge pull request #2010 from tanwanirahul/master
Ability to customize method names without creating a custom router
2014-12-19 16:09:01 +00:00
tanwanirahul
2448cc8e85 Updated tests to use url_path attribute in list and detail decorators 2014-12-19 19:53:48 +05:30
Tom Christie
6d907cde9a get_field_names, get_default_field_names 2014-12-19 12:18:40 +00:00
Tom Christie
c8d88c8c8a Merge branch 'master' into version-3.1 2014-12-18 11:21:25 +00:00
Tom Christie
1087ccbb25 Drop print statements in tests 2014-12-18 10:39:00 +00:00
Tom Christie
87ac64e41b Fixes for behavior with empty HTML fields. 2014-12-18 10:36:52 +00:00
Tom Christie
ad6533e554 Merge pull request #2294 from tomchristie/fix-empty-html-values-with-default
Fix empty HTML values when a default is provided.
2014-12-17 15:24:01 +00:00
Tom Christie
3fff5cb6e0 Fix empty HTML values when a default is provided. 2014-12-17 15:13:48 +00:00
Tom Christie
c6137bbf5a Serializer API restrictions. 2014-12-17 14:14:51 +00:00
Tom Christie
7fbf5b0e6b Merge pull request #2155 from martinmaillard/set-user-on-wrapped-request
Set authenticated user on wrapped request
2014-12-17 13:12:01 +00:00
Tom Christie
05a6eaec8a More docs, plus 'ALLOWED_VERSIONS' setting. 2014-12-17 12:41:46 +00:00
Tom Christie
4e91ec6133 Added NamespaceVersioning 2014-12-16 16:14:08 +00:00
Tom Christie
7cfa0e0306 Merge lateset version-3.1 2014-12-16 15:35:25 +00:00
Tom Christie
74483338ab Merge branch 'master' into version-3.1 2014-12-16 15:34:28 +00:00
Tom Christie
6e51e4f5cd Versioning first pass 2014-12-16 15:34:19 +00:00
Martin Maillard
a68e78bd0b Add test integrated with middleware 2014-12-16 15:41:16 +01:00
Tom Christie
a15db353bf Minor test cleanup 2014-12-15 13:18:39 +00:00
Tom Christie
b6ee784240 Merge master 2014-12-15 12:18:55 +00:00
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