Commit Graph

5956 Commits

Author SHA1 Message Date
Tom Christie
2d5e8dea15 Merge pull request #3255 from jamesbeith/issues/#3254-display-value
Add a method to return the string value used in `choices` of a `RelatedField`
2015-08-10 16:32:29 +01:00
James Beith
5c0a2b79b3 Remove converting a string in to a string
The `display_value` method returns a text type.
2015-08-10 15:33:04 +01:00
James Beith
eaf61449a8 Explain use case for display_value in docs 2015-08-10 13:02:07 +01:00
James Beith
66ae19229e Add docs for display_value 2015-08-10 12:38:27 +01:00
James Beith
e9d9cb7011 Add tests for display_value 2015-08-10 12:19:46 +01:00
James Beith
2f6e5d0509 Add display value method
Returns the text representation of the instance. Subclasses can override this method to provide a different display value used for populating the `choices` property.
2015-08-10 11:03:57 +01:00
Ryan Kaneshiro
bc6bf7236b Add test to repro duplicate validation error
Using the ModelSerializer with a model containing a GenericIPAddressField
produces duplicated validation error messages.
2015-08-07 16:53:43 -07:00
José Padilla
7a0416c50b Raise error if passed a serializer instance 2015-08-07 13:12:37 -04:00
Tom Christie
0cbfbc27d8 Tweak erronous assignment 2015-08-07 15:41:46 +01:00
Tom Christie
3ea394dbff Version 3.2.1 2015-08-07 14:55:18 +01:00
Tom Christie
fbd05aba57 Merge branch 'master' of github.com:tomchristie/django-rest-framework 2015-08-07 14:47:09 +01:00
Tom Christie
e88f28dbad Call out supported versions. Closes #3232. 2015-08-07 14:47:00 +01:00
Tom Christie
368fb9fb2a Merge pull request #3238 from kezabelle/bugfix/3235
Fixed #3235 - ListField now returns the QueryDict value even if it's a list of only one item.
2015-08-07 14:44:32 +01:00
Tom Christie
65e1c938eb Fix for 1, 0 being rendered as true, false in the admin. Closes #3227. 2015-08-07 14:38:36 +01:00
Tom Christie
e63dcab8b3 Fix for rendering select templates on relationships 2015-08-07 14:36:00 +01:00
Tom Christie
88609ba3a3 Merge branch 'master' of github.com:tomchristie/django-rest-framework 2015-08-07 14:24:37 +01:00
Tom Christie
19c1976fcc Leave requests.FILES alone, for compat with regular Django requests. Closes #3239. 2015-08-07 14:24:28 +01:00
Keryn Knight
0078f66104 Fixed #3235 - A querydict which yields a list with only one value now correctly returns the provided data. 2015-08-07 11:43:17 +01:00
Keryn Knight
08d60f5cc2 Refs #3235 - Test demonstrating a single value passed to ListField is lost. 2015-08-07 11:41:56 +01:00
Tom Christie
981265fc48 Merge pull request #3231 from maryokhin/feature/drf3.2-readme
Update README with 3.2 release
2015-08-07 11:26:13 +01:00
Tymur Maryokhin
85e3edd7ff Update README and docs with 3.2 release 2015-08-07 12:12:01 +02:00
Tom Christie
77867e1eef Merge pull request #3230 from maryokhin/master
Fully drop Django 1.4 support
2015-08-07 09:57:28 +01:00
Tymur Maryokhin
4e5da16961 Remove Django 1.4 compat code 2015-08-07 00:02:29 +02:00
José Padilla
2fd5b8a2f9 Merge pull request #3229 from charettes/3.2-announcement-typo
Fixed a small typo in the 3.2 release announcement.
2015-08-06 17:55:34 -04:00
Simon Charette
bcc0d54f98 Fixed a small typo in the 3.2 release announcement. 2015-08-06 16:56:39 -04:00
Tom Christie
67ddd54a89 Merge pull request #3226 from tomchristie/version-3.2
Version 3.2
2015-08-06 14:30:46 +01:00
Tom Christie
e3aaa323b7 Add 3.2 announcement 2015-08-06 14:18:23 +01:00
Tom Christie
b4f1a8a367 Update translations 2015-08-06 13:22:53 +01:00
Tom Christie
78053c7e6c Upgrade version to 3.2.0 2015-08-06 13:18:51 +01:00
Tom Christie
a428d76ada Add 3.2 release notes 2015-08-06 13:18:18 +01:00
Tom Christie
37b4d42488 Merge pull request #3225 from tomchristie/maxpeterson-grouped-choices-fix
Support grouped choices.
2015-08-06 13:01:08 +01:00
Tom Christie
33d6d4a420 Test more types of behavior in test_iter_options 2015-08-06 12:30:26 +01:00
Tom Christie
24dec32e7a Added test_iter_options 2015-08-06 12:18:09 +01:00
Tom Christie
4d69286efa Use same structure for both .choices and .grouped_choices 2015-08-06 12:03:38 +01:00
Tom Christie
a6fefe78ff Added docstring 2015-08-06 11:44:39 +01:00
Tom Christie
27ac5a3680 Support grouped choices 2015-08-06 11:43:03 +01:00
Tom Christie
95a1550388 Merge branch 'grouped-choices-fix' of https://github.com/maxpeterson/django-rest-framework into maxpeterson-grouped-choices-fix 2015-08-06 10:04:52 +01:00
Tom Christie
9a778793f8 Adding imports to docs 2015-08-06 09:56:09 +01:00
Tom Christie
bbe5044c04 Merge pull request #3223 from wwj718/patch-1
import permission_classes
2015-08-06 09:54:25 +01:00
Tom Christie
38a1b3ec6b Rationalize decimal logic. Closes #3222. 2015-08-06 09:51:00 +01:00
wwj718
c099d9aac4 import permission_classes
many people don't know how to import permission_classes
2015-08-06 11:08:56 +08:00
Tom Christie
f7d44dfae0 Loud errors on request.DATA et al. 2015-08-05 17:07:47 +01:00
Tom Christie
6942fa5dab Mask view docstring on 401 and 403 responses. Closes #3216. 2015-08-05 13:59:55 +01:00
Tom Christie
6161ac7d07 Fix parse_html_dict signature. Closes #3212. 2015-08-05 13:45:56 +01:00
Tom Christie
7b51508600 Error on double underscore ordering with CursorPagination. Refs #3221. 2015-08-05 13:42:44 +01:00
Tom Christie
18c9391218 Use shields.io image 2015-08-04 09:47:36 +01:00
Tom Christie
cc5af22dc0 Use 'shilds.io' badge for codecov 2015-08-04 09:45:20 +01:00
Tom Christie
1df5844e67 Merge pull request #3208 from treyhunner/add-codecov
Report test coverage via Codecov
2015-08-03 17:13:46 +01:00
Trey Hunner
34c74b8925 Add coverage badge 2015-08-03 08:57:18 -07:00
Trey Hunner
4cb14d8240 Don't measure branch coverage 2015-08-03 08:39:24 -07:00