Commit Graph

64 Commits

Author SHA1 Message Date
Brandon Cazander
ac87490b91 Clone the versioning_scheme when necessary. Fixes #2477 2015-01-27 17:10:17 -08:00
Brandon Cazander
bf58c1265d Set a version attribute on cloned requests if necessary. 2015-01-26 22:56:57 -08:00
Brandon Cazander
ed04725822 Use enhanced request when cloning requests for checking permissions on other methods. Fixes #2455 2015-01-24 01:44:40 -08:00
Tom Christie
65fc0d0f77 Ensure request.auth is available to response middleware. 2014-12-17 13:22:52 +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
Tymur Maryokhin
d54c67d79d Removed custom StringIO, force_text, smart_text compat 2014-12-04 03:11:42 +01:00
Martin Maillard
85c96bb574 Set user on wrapped request 2014-11-28 21:12:27 +01:00
Tom Christie
2e726e22a3 request.DATA, request.FILES -> request.data 2014-11-25 11:42:43 +00:00
Tom Christie
2daf085100 Copy accepted_renderer and accepted_media_type when cloing a request. Closes #1950. 2014-11-05 11:08:32 +00:00
Tom Christie
14ae52a24e More gradual deprecation 2014-10-08 16:09:37 +01:00
Tom Christie
2859eaf524 request.data attribute 2014-09-26 10:46:52 +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
97d8f037cc Only set .action attribute in override_method if it already existed on the view 2014-08-18 20:56:17 +01:00
Tom Christie
01986fc80e Merge pull request #1763 from fongandrew/patch-1
override_method should substitute action
2014-08-18 20:39:09 +01:00
Tom Christie
33af92e019 Always uppercase X-Http-Method-Override methods. Closes #1718. 2014-08-18 15:14:30 +01:00
Andrew Fong
21cbf3484e Fixed action_map being pulled from wrong object 2014-08-16 23:22:18 +00:00
Andrew Fong
5f63d31b00 override_method should substitute action
A view's action is dependent on the request method. When overriding the method (e.g. to generate a form for a POST request on a GET call to the browseable API), the action should be updated as well. Otherwise, viewset functions may be in a weird limbo state where a 'list' action has a POST method.
2014-08-16 15:05:46 -07:00
Daniel Kontsek
3b71be725a Fixed encoding parameter in QueryDict 2014-03-22 10:32:59 +01:00
Tom Christie
47f5bd488d Merge pull request #1361 from ross/x_method_override
always obey X-HTTP-METHOD-OVERRIDE header
2014-01-17 08:19:06 -08:00
Ross McFarland
58d77c11c3 always obey X-HTTP-METHOD-OVERRIDE header
required to support old flash/flex clients that need to do everything as
GET requests (apparently to allow for any error handlings)
2014-01-17 08:14:05 -08:00
Tom Christie
c6182b78e5 Merge pull request #1341 from fredrikmollerstrand/docstring-typo-fix
fix docstring typos.
2014-01-09 07:51:02 -08:00
Fredrik Möllerstrand
82a48ca55e fix docstring typos. 2014-01-09 15:41:20 +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
c1d9a96df0 Catch errors during parsing and set empty .DATA/.FILES before re-raising. 2013-12-03 08:58:05 +00:00
alexanderlukanin13
6b3500b684 Fixed UnicodeEncodeError when POST JSON via web interface; added test 2013-10-24 17:52:52 +06:00
Tom Christie
37e2720a40 Add override_method context manager and cleanup. 2013-08-29 12:55:56 +01:00
Tom Christie
664f8c6365 Added APIClient.authenticate() 2013-06-29 21:02:58 +01:00
Tom Christie
6e0567c271 request.user should be still be accessible in renderer context if authentication fails 2013-06-03 12:32:57 +01:00
Tom Christie
95abe6e844 Cleanup docstrings 2013-04-25 12:47:34 +01:00
Tom Christie
377dc2cda2 Only honor X-HTTP-Method-Override for POST requests. 2013-03-12 20:49:20 +00:00
Dave Kuhn
104614c600 Modified to allow form overloading to take precedence over header. 2013-03-04 07:14:38 +11:00
Dave Kuhn
9dccbcbb38 Support for X-HTTP-Method-Override header 2013-03-03 00:23:32 +11:00
Tom Christie
af686ec11a request.DATA should use empty QueryDict for no data, not None. 2013-02-14 13:02:28 +00:00
Tom Christie
9d3153ed04 Fix broken clone_request 2013-02-14 12:50:55 +00:00
Tom Christie
870f10486c Fix incorrect 401 vs 403 response, if lazy authentication has not taken place. 2013-02-10 20:08:36 +00:00
Tom Christie
0a38bc9db8 Deal with parser encodings properly 2013-02-04 21:16:34 +00:00
Tom Christie
b052c92ac3 Cleanup imports
Mostly adding `from __future__ import unicode_literals` everywhere.
2013-02-04 20:55:35 +00:00
Tom Christie
00752dcd2a Py3k cleanup 2013-02-01 15:07:51 +00:00
Tom Christie
d9c7b1c585 Merge branch 'p3k' of https://github.com/linovia/django-rest-framework into working
Conflicts:
	rest_framework/authentication.py
	rest_framework/relations.py
	rest_framework/serializers.py
	rest_framework/settings.py
	rest_framework/tests/authentication.py
	rest_framework/tests/genericrelations.py
	rest_framework/tests/generics.py
	rest_framework/tests/relations_hyperlink.py
	rest_framework/tests/relations_nested.py
	rest_framework/tests/relations_pk.py
	rest_framework/tests/serializer.py
2013-02-01 11:58:55 +00:00
Tom Christie
36fa722ebb Merged to latest master 2013-01-07 21:04:52 +00:00
Xavier Ordoquy
60250f22c8 Move the various compat things to the compat module. 2013-01-03 11:41:07 +01:00
Xavier Ordoquy
737349d238 Merge remote-tracking branch 'reference/py3k' into p3k 2013-01-02 16:09:21 +01:00
Mark Hughes
125f027d2d Added setter to the auth property 2012-12-20 23:48:10 +00:00
Mark Hughes
85a921c7ef Added setter to user property 2012-11-24 17:18:32 +00:00
Xavier Ordoquy
e348ee9255 52 tests passing. Refactored a few string / byte io. 2012-11-23 01:12:33 +01:00
Xavier Ordoquy
606c20f012 6 first tests passes under python 3.2 2012-11-22 02:08:00 +01:00
Xavier Ordoquy
b3698acb6c First passing test under p3k \o/ 2012-11-22 00:20:49 +01:00
Tom Christie
873a142af2 Implementing 401 vs 403 responses 2012-11-13 11:27:09 +00:00
Tom Christie
44207a347a pep8 2012-10-27 10:33:01 +01:00