Commit Graph

126 Commits

Author SHA1 Message Date
Tom Christie
63d02dbea8 Drop six from compat. 1.4.2 is now the lowest supported version. 2014-08-19 17:06:55 +01:00
Tom Christie
d2795dd26d Resolve linting issues 2014-08-19 13:54:52 +01:00
Tom Christie
bf09c32de8 Code linting and added runtests.py 2014-08-19 13:28:07 +01:00
Tom Christie
09c53bbac9 Refactor JSONRenderer slightly for easier overriding 2014-08-11 16:20:27 +01:00
Miro Hrončok
7ae8409370 Allow unicode YAML dump with UnicodeYAMLRenderer
Fixes #1519
2014-04-10 01:47:30 +02:00
David Larlet
84e7bf6796 Update documentation of render methods (obj to data) 2014-03-04 17:21:07 +01:00
Keats
6cd0394e20 Display the media type of the API response on the browsable API 2014-02-26 23:47:35 +00:00
Ian Foote
0043f30cab Use bytes BOUNDARY on django < 1.5
Django's encode_multipart was updated in django 1.5 to work internally
with unicode and convert to bytes.

In django >= 1.5 we therefore need to pass the BOUNDARY as unicode. In
django < 1.5 we still need to pass it as bytes.
2014-01-31 09:12:45 +00:00
Tom Christie
06d8a31e13 Catch and mask ParseErrors that occur during rendering of the BrowsableAPI. 2013-12-09 07:34:08 +00:00
Tom Christie
8d4ba478cc Fix rendering of forms and add error rendering on HTML form 2013-10-02 16:13:34 +01:00
Tom Christie
a14f1e8864 Serializers can now be rendered directly to HTML 2013-10-02 13:45:35 +01:00
Tom Christie
75d6446c87 Allow .template_name attribute specified on view. Closes #1000 2013-09-26 16:09:08 +01: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
Tom Christie
3fba60e99c Drop broken placeholder serializations. 2013-08-30 09:02:54 +01:00
Tom Christie
e4d2f54529 Fix indenting on raw data forms 2013-08-29 20:39:05 +01:00
Tom Christie
c7f3b8bebe Include serialized content in raw data form. 2013-08-29 17:23:26 +01: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
8d590ebfde First hacky pass at displaying raw data 2013-08-27 11:22:19 +01: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
Tom Christie
436e66a42d JSON responses should not include a charset 2013-08-23 16:45:55 +01:00
Tom Christie
e23d588852 Adding standard renderer attributes and documenting 2013-08-23 16:16:41 +01:00
Tom Christie
10d386ec6a Cleanup and dealing with empty form data. 2013-08-23 16:10:20 +01:00
Tom Christie
0966a2680b First pass at HTMLFormRenderer 2013-08-23 14:38:31 +01:00
Christopher Paolini
e6662d434f Improved view/description function setting
Now supports each View having its own name and description function and
overriding the global default.
2013-08-17 17:44:51 -04:00
Tom Christie
664f8c6365 Added APIClient.authenticate() 2013-06-29 21:02:58 +01:00
Tom Christie
7224b20d58 Added APIRequestFactory 2013-06-28 17:17:39 +01:00
Tom Christie
f8a0d31d71 Remove ConfigurationError in favor of Django's ImproperlyConfigured 2013-06-05 13:45:28 +01:00
Tom Christie
2a38aa7291 Version 2.3.4 2013-05-24 23:55:59 +01:00
Tom Christie
7a93fdbe0a Last bits of charset sorting-out-ness 2013-05-22 16:46:15 +01:00
Tom Christie
cdc3c37465 Merge and styling fixes 2013-05-21 12:01:56 +01:00
Tom Christie
f19e0d544f Fix charset issues 2013-05-20 21:00:56 +01:00
Tom Christie
7c945b43f0 Only use object permissions in browsable api form generation if an object exists 2013-05-18 23:52:02 +01:00
Tom Christie
4802177766 Enforce object permissions check when rendering forms in browseable API 2013-05-18 21:19:53 +01:00
Tom Christie
4631b91e14 Fix broken 'binary content' in browseable API 2013-05-18 21:12:44 +01:00
Tom Christie
d4721fc1f7 Correct charset on UnicodeJSONRenderer 2013-05-18 17:25:38 +01:00
Tom Christie
bac4bf6e95 Merge branch 'master' of https://github.com/tomchristie/django-rest-framework 2013-05-18 17:22:27 +01:00
Tom Christie
0d3d66cb02 Added proper charset support 2013-05-18 17:21:43 +01:00
Pablo Recio
6dbbbc16da Better checking if the content can be printable in the BrowsableAPI 2013-05-18 17:06:54 +02:00
Pablo Recio
97f034e3d6 Adds UnicodeJSONRenderer which doesn't ensure ascii 2013-05-18 17:06:54 +02:00
Pablo Recio
c69f960066 Adding a class attribute into JSONRenderer for ensuring ascii, and using it consistently 2013-05-18 17:06:54 +02:00
Karol Majta
ebe959b52a charset param gets now appended to response's Content-Type. Closes #807 2013-05-18 16:45:05 +02:00
Markus Törnqvist
e7ddaf5472 Turns out label and help_text are not always there 2013-05-18 16:50:59 +03:00
Markus Törnqvist
1343398868 Renderer uses form field's label and help, not attribute name 2013-05-18 15:15:02 +03:00
Tom Christie
aea040161a Forms in Broseable API support dynamic serializers based on request method 2013-05-18 09:36:09 +01:00
Tom Christie
b70c9cc107 Merge master 2013-05-05 18:12:35 +01:00
Victor Shih
8cabae22c5 Example and spelling fixes. Change "browseable" to "browsable" for consistency. 2013-05-01 21:26:40 -07:00
Tom Christie
8dff8d2fdc Add get_breadcrumbs hook to BrowseableAPIRenderer. Closes #733. 2013-04-30 14:34:03 +01:00