Commit Graph

239 Commits

Author SHA1 Message Date
Tom Christie
8d7c0a8474 Merge branch 'feature/filepathfield' of https://github.com/Ins1ne/django-rest-framework into Ins1ne-feature/filepathfield 2015-08-03 10:09:46 +01:00
Tom Christie
5c1d6a9200 Docs for AdminRenderer 2015-07-30 14:07:51 +01:00
Tom Christie
4c1597efe0 Error modals 2015-07-23 16:16:48 +01:00
Tom Christie
b996266431 Merge master 2015-07-23 15:28:29 +01:00
Aider Ibragimov
d845157983 Merge branch 'master' of https://github.com/tomchristie/django-rest-framework into feature/filepathfield 2015-07-18 23:34:07 +03:00
Tom Christie
6b08e97b6a Form fields should use textual only value representations. Closes #3139. Closes #2416. Closes #2558. 2015-07-14 15:47:13 +01:00
Tom Christie
132eab7bbd Raise helpful error when erronously including nested data in multipart post requests with test client. Closes #2919. 2015-07-14 14:49:44 +01:00
José Padilla
7351a3f6ca Sort imports with isort 2015-06-25 16:55:51 -04:00
José Padilla
83c9136c90 Cleanup import following PEP 8 style guide 2015-06-25 16:10:17 -04:00
Tom Christie
25bb3b1502 Use chevron control for row linking, rather than hyperlinking first item 2015-06-03 11:15:54 +01:00
Tom Christie
c916ad6315 Handle create and delete redirects 2015-05-19 16:30:45 +01:00
Tom Christie
ec8e7f27e7 Fixes for format preservation 2015-05-19 15:49:37 +01:00
Tom Christie
9a504efd26 Basic formatting for admin cells 2015-05-12 15:21:49 +01:00
Tom Christie
995aa47570 First pass templates for admin style 2015-05-12 14:49:09 +01:00
iorlas
548ac9a65e Now it is possible to display viewset w/o paginator
Since pagination is now included in every generic viewset, we should have ability to disable it and we have it: paginator=None or pagination_class=None. But this piece of code relies on existence of property instead of its value.
2015-04-08 20:32:02 +03:00
mdoglio
77c44d8c63 Make BrowsableAPIRenderer use serializer_class when present 2015-03-22 14:36:30 +00:00
Aider Ibragimov
c20a0250df add FilePathField, update docs 2015-03-03 14:34:06 +03:00
Rubén Durá Tarí
60617f876a Fixes HiddenField being rendered in HTMLFormRenderer 2015-02-20 07:50:15 -04:00
Tom Christie
dbd2352165 Fixes for latest pep8 updates. Refs #2563. 2015-02-17 10:58:00 +00:00
Tom Christie
39f26c9eca Merge master 2015-01-23 14:28:59 +00:00
Tom Christie
4cf03e30ff Do not render HTML output for hidden fields. Closes #2410. 2015-01-21 14:27:51 +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
Alexander Dutton
af05820b1b NotImplemented is not an exception
`NotImplemented` is a singleton object, not an exception. You should be raising `NotImplementedError` here instead.
2015-01-19 14:23:13 +00:00
Tom Christie
d76e83dd78 Tweaks, and add pagination controls for offset/limit. 2015-01-15 16:52:07 +00:00
Tom Christie
3833a5bb8a Include pagination control in browsable API 2015-01-14 16:51:26 +00:00
Tom Christie
c8d88c8c8a Merge branch 'master' into version-3.1 2014-12-18 11:21:25 +00:00
Tom Christie
c6137bbf5a Serializer API restrictions. 2014-12-17 14:14:51 +00:00
Tom Christie
baaa356489 Merge master 2014-12-12 15:37:43 +00:00
Tom Christie
41bfdc0732 Don't use 'instance' argument in rendering form for paginated data. Closes #2205. 2014-12-08 21:56:06 +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
Tymur Maryokhin
d9930181ee Removed unused imports, pep8 fixes, typo fixes 2014-12-05 00:29:28 +01:00
Tymur Maryokhin
45dc44b203 Merge branch 'master' of github.com:tomchristie/django-rest-framework 2014-12-04 20:57:27 +01:00
Tom Christie
e8cbf41bd9 Merge pull request #2172 from kchange/master
Added missing default style for FileField
2014-12-04 07:47:53 +00:00
Tymur Maryokhin
d54c67d79d Removed custom StringIO, force_text, smart_text compat 2014-12-04 03:11:42 +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
23fa6e54ce Escape \u2028 and \u2029 in JSON output.
Closes #2169.
2014-12-03 22:33:34 +00: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
José Padilla
731c8421af Remove YAML support from core 2014-11-29 14:43:05 -04:00
Tom Christie
5b671cb515 Fix rendering HTML form when API error raised. Closes #2103. 2014-11-20 16:14:51 +00:00
Tom Christie
1aa58d16be Py3 fix - .items is not a list. 2014-11-20 14:26:40 +00:00
Tom Christie
6ec96d0bac Resolve PUT and POST buttons in browsable API 2014-11-20 13:43:38 +00:00
Tom Christie
080bd3d24e Add comment ref #2089 2014-11-18 15:38:31 +00:00
Tom Christie
084354d3eb Only pass instance to form for PUT and PATCH. Closes #2073. 2014-11-18 15:11:40 +00:00
Tom Christie
fd97d9bff8 Use select inputs for relationships. Closes #2058. 2014-11-13 19:35:03 +00:00
Kevin Chang
dbb435ca31 Added missing default style for FileField 2014-11-12 12:46:09 -08:00
Tom Christie
3e878a3207 Fix initial data on serializers to reflect writable fields 2014-11-07 15:38:27 +00:00
Tom Christie
041435f4ee Prevent re-running deserialization. Closes #1975. 2014-11-07 14:08:20 +00:00
Tom Christie
cd40dcb065 Ensure json.dumps(separators=...) works on both 2.x and 3.x 2014-10-30 16:53:12 +00:00
Tom Christie
5882a7a9d5 Tweak 2014-10-16 20:47:57 +01:00
Tom Christie
b4f3379c70 Support fields that reference a simple callable 2014-10-15 15:13:28 +01:00
Tom Christie
cc1c423255 Reorganize to use template_pack in form rendering 2014-10-15 11:12:34 +01:00
Tom Christie
5d247a65c8 First pass on nested serializers in HTML 2014-10-09 15:11:19 +01:00
Tom Christie
df7b6fcf58 First pass on incorperating the form rendering into the browsable API 2014-10-02 16:24:24 +01:00
Tom Christie
ffc6aa3abc More forms support 2014-10-01 21:35:27 +01:00
Tom Christie
c171fa21ac First pass at HTML form rendering 2014-10-01 19:44:46 +01:00
Tom Christie
2859eaf524 request.data attribute 2014-09-26 10:46:52 +01:00
Tom Christie
5e39e159ee UNICODE_JSON and COMPACT_JSON settings 2014-09-12 11:38:22 +01:00
Tom Christie
ec096a1cac Add relations and get tests running 2014-09-02 15:07:56 +01:00
Tom Christie
4ac4676a40 First pass 2014-08-29 16:46:26 +01:00
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