Commit Graph

25 Commits

Author SHA1 Message Date
Tom Christie
426547c61c str() -> six.text_type(). Closes #2290. 2014-12-17 13:39:35 +00:00
Tymur Maryokhin
d54c67d79d Removed custom StringIO, force_text, smart_text compat 2014-12-04 03:11:42 +01:00
Tom Christie
7d417fc678 Make _force_text_recursive private. 2014-11-20 12:02:58 +00:00
Tom Christie
6cb6510132 Use translatable error strings. Refs #2063. 2014-11-19 12:15:05 +00:00
Kevin London
9521b69711 #2054: Update exceptions to allow custom detail
This addresses the changes requested in #2054 and allows for custom messages that do not necessarily require a string formatter be present in the detail message.
2014-11-10 11:08:39 -08:00
Tom Christie
05cbec9dd7 Use serializers.ValidationError 2014-10-17 13:23:14 +01:00
Tom Christie
d9a199ca0d exceptions.ValidationFailed, not Django's ValidationError 2014-10-10 14:16:09 +01:00
Tom Christie
21980b800d More test sorting 2014-09-08 14:24:05 +01:00
Tom Christie
d934824bff Workin on 2014-09-05 16:29:46 +01:00
Dmitry Mukhin
3b07d0c997 Merge branch 'master' into set-retry-after
Conflicts:
	tests/test_throttling.py
2014-08-20 20:04:48 +04:00
Tom Christie
bf09c32de8 Code linting and added runtests.py 2014-08-19 13:28:07 +01:00
Dmitry Mukhin
c3891b6e00 set Retry-After header when throttled 2014-04-07 20:31:12 +04:00
jacobg
6322feb32d add a __str__ implementation to APIException
Add a __str__ implementation to rest_framework.exceptions.APIException. This helps for logging raised exceptions. Thanks.
2014-04-04 10:22:02 -04:00
Hassan Shamim
97b7c25987 Replace 'detail' with 'default_detail' in Exceptions guide and APIException class docstring. 2014-02-10 12:54:56 -06:00
Tom Christie
d937ce331c Minor cleanup 2014-01-13 17:37:08 +00:00
Chris Guethle
7a87893b96 reworked APIException, pushing some of the status_code and detail management up. Also, makes the APIException useful in isolation (defaults to status code 500) 2013-10-24 09:40:43 -05:00
Tom Christie
f8a0d31d71 Remove ConfigurationError in favor of Django's ImproperlyConfigured 2013-06-05 13:45:28 +01:00
Tom Christie
b052c92ac3 Cleanup imports
Mostly adding `from __future__ import unicode_literals` everywhere.
2013-02-04 20:55:35 +00:00
Tom Christie
8953a60196 Merge with master 2012-11-09 13:49:52 +00:00
Tom Christie
d206c686a6 Fixes for urls with suffixes 2012-10-29 17:08:38 +00:00
Tom Christie
b78872b7db Use two seperate exceptions - AuthenticationFailed, and NotAuthenticated
Cleaner seperation of exception and resulting HTTP response.
Should result in more obvious error messages.
2012-10-17 15:23:36 +01:00
Tom Christie
dc9384f9b4 Use correct status code 2012-10-17 15:09:20 +01:00
Tom Christie
4c17d1441f Add Unauthenticated exception. 2012-10-17 14:59:37 +01:00
Tom Christie
0cc7030aab Fix @api_view decorator tests 2012-09-26 21:47:19 +01:00
Tom Christie
4b691c4027 Change package name: djangorestframework -> rest_framework 2012-09-20 13:06:27 +01:00