Tom Christie
36bd4f22a7
Merge pull request #1107 from dpretty/master
...
Let JSONEncoder handle Numpy data types.
2013-09-13 11:42:15 -07:00
Tai Lee
a9dbd46c94
Refs #1109 -- Update docs. Integrate changes from feedback.
2013-09-14 00:54:44 +10:00
Tai Lee
bb3261ca48
Fixed #1105 -- Add hook for custom context in BrowsableAPIRenderer
.
...
Replace hard coded response status check with `allow_form` context
variable, so that it can be overridden in a custom renderer class.
2013-09-13 23:11:44 +10:00
Rajiv Bose
0de1a1a0ad
Typo in strings referring to Python package, django-filter.
...
On skip of django_filters related unit-tests the reason given states the Python package 'django-filters' is not install.
However, the Python package required to run django_filters related tests is 'django-filter'.
2013-09-13 11:55:16 +01:00
David Pretty
d489c5c881
Let JSONEncoder handle Numpy data types.
...
json.JSONEncoder cannot serialize Numpy data types. Numpy arrays
and array scalars have a tolist() method which casts the object to
a standard python data type.
2013-09-13 13:36:18 +10:00
Tom Christie
cd3040737e
Merge pull request #1097 from mociepka/add_default_order_by_in_filtering
...
Add order_by to the AutoFilterSet
2013-09-12 13:24:26 -07:00
Tom Christie
195790e60b
Version 2.3.8
2013-09-11 09:09:30 +01:00
Tom Christie
5970baa201
Tweaks and docs to object-level model permissions.
2013-09-10 21:00:13 +01:00
Tom Christie
75fb4b02b4
Merge branch 'master' of git://github.com/bwreilly/django-rest-framework into bwreilly-master
2013-09-10 20:21:15 +01:00
Michał Ociepka
222c1d1122
Add order_by to the AutoFilterSet
...
`AutoFilterSet` should contains `order_by` set to all by default.
2013-09-10 12:02:14 +02:00
bwreilly
23fc9dd53f
better doc for object permissions, drop redundant has_permission call
2013-09-09 09:32:29 -07:00
bwreilly
0183c69538
removed unnecessary guardian req and view.action parsing
2013-09-09 08:39:09 -07:00
bwreilly
9ff0f6d3bf
switch to a dedicated filter for read list object permissions
2013-09-07 23:48:03 -05:00
bwreilly
118645e480
first pass at object level permissions and tests
2013-09-07 23:18:52 -05:00
bwreilly
57d6b5fb7c
necessary test settings for guardian
2013-09-07 23:16:43 -05:00
Andy Freeland
b5523bcc7d
Support customizable view EXCEPTION_HANDLER
...
Add `api_settings.EXCEPTION_HANDLER` to support custom error responses.
Fixes #907 .
2013-09-06 12:47:33 -05:00
bwreilly
b07de86ad3
some properly failing tests, set up for standard permissions
2013-09-06 12:35:06 -05:00
bwreilly
4a9dcfa760
added guardian as optional requirement, stubbed out object-level permission class
2013-09-06 11:01:31 -05:00
Tom Christie
196a895fe4
Merge pull request #1076 from edmondwong/master
...
Allow OPTIONS to retrieve PUT field metadata on empty objects
2013-09-05 12:24:17 -07:00
Edmond Wong
6e7e4fc01c
Added test for OPTIONS before object creation from a PUT
2013-09-03 12:30:18 -07:00
Yuri Prezument
745ebeca77
Handle case where obj=None in PKRelatedField.field_to_native()
...
Fixes #1072
2013-08-31 17:20:49 +03:00
Yuri Prezument
a15cda4be4
Regression test for #1072
2013-08-31 17:10:15 +03:00
Edmond Wong
3063a50fc2
Allow OPTIONS to retrieve PUT field metadata on empty objects
...
This allows OPTIONS to return the PUT endpoint's object serializer metadata when the object hasn't been created yet.
2013-08-30 18:03:44 -07:00
Tom Christie
f3ab0b2b1d
Browsable API tab preferences should be site-wide
2013-08-30 09:20:12 +01:00
Tom Christie
cba972911a
Fix failing empty serializer test
2013-08-30 09:12:39 +01:00
Tom Christie
3fba60e99c
Drop broken placeholder serializations.
2013-08-30 09:02:54 +01:00
Tom Christie
2247fd68e9
Fix multipart error when used via content-type overloading
2013-08-29 21:24:29 +01:00
Tom Christie
19f9adacb2
Merge branch 'master' into display-raw-data
2013-08-29 20:52:46 +01:00
Tom Christie
02b6836ee8
Fix breadcrumb view names
2013-08-29 20:51:51 +01:00
Tom Christie
e4d2f54529
Fix indenting on raw data forms
2013-08-29 20:39:05 +01:00
Tom Christie
44f8d1bef2
Fix tab preferences on PUT forms
2013-08-29 20:38:55 +01:00
Tom Christie
1fa2d823cc
Preserve tab preference in cookies.
2013-08-29 20:35:59 +01:00
Tom Christie
c7f3b8bebe
Include serialized content in raw data form.
2013-08-29 17:23:26 +01:00
Mathieu Pillard
11071499a7
Make ChoiceField.from_native() follow IntegerField behaviour on empty values
2013-08-29 18:10:47 +02:00
Tom Christie
37e2720a40
Add override_method
context manager and cleanup.
2013-08-29 12:55:56 +01:00
Tom Christie
18007d6846
Simplifying raw data renderering support
2013-08-28 21:52:56 +01:00
Tom Christie
2d5e14a8d3
Throttles now use HTTP_X_FORWARDED_FOR, falling back to REMOTE_ADDR to identify anonymous requests
2013-08-28 15:32:41 +01:00
Tom Christie
97b52156cc
Added .cache
attribute on throttles.
...
Closes #1066 . More localised than a new settings key, and more
flexible in that different throttles can use different behavior.
Thanks to @chicheng for the report! :)
2013-08-28 13:34:14 +01:00
Tom Christie
4c53fb883f
Tweak MAX_PAGINATE_BY behavior in edge case.
...
Always respect `paginate_by` settings if client does not specify page
size. (Even if the developer has misconfigured, so that `paginate_by >
max`.)
2013-08-28 12:52:38 +01:00
Tom Christie
e1b54f2a2a
Merge branch 'max_paginate_by' of git://github.com/alexander-akhmetov/django-rest-framework into alexander-akhmetov-max_paginate_by
2013-08-27 20:58:30 +01:00
Alexander Akhmetov
7fb3f078f0
fix for python3
2013-08-27 17:42:10 +04:00
Tom Christie
b54cbd292c
Use view.settings for API settings, to make testing easier.
2013-08-27 12:36:06 +01:00
Tom Christie
b430503fa6
Move exception handler out of main view
2013-08-27 12:32:33 +01:00
Tom Christie
dce47a11d3
Move settings into more sensible ordering
2013-08-27 12:32:13 +01:00
Tom Christie
8d590ebfde
First hacky pass at displaying raw data
2013-08-27 11:22:19 +01:00
Alexander Akhmetov
316de3a8a3
Added max_paginate_by parameter
2013-08-26 20:14:17 +04:00
Tom Christie
ab68d355f5
Merge pull request #1058 from ericbuehl/master
...
parameterize identity field serializer class to allow for easier subclassing
2013-08-25 12:46:11 -07:00
Eric Buehl
9d3fae27fd
parameterize identity field class to allow for easier subclassing
2013-08-23 16:48:32 +00:00
Tom Christie
be0f5850c3
Extra docs
2013-08-23 16:51:34 +01:00
Tom Christie
c77e4a2c59
Merge branch 'master' into html-form-renderer
2013-08-23 16:46:14 +01:00