Commit Graph

422 Commits

Author SHA1 Message Date
Tom Christie
314c0095aa iter_options function should have no cutoff by deault 2015-08-21 10:56:22 +01:00
Tom Christie
99beeb80e1 No cutoff for default ChoiceField, only for relationships 2015-08-21 10:53:10 +01:00
Tom Christie
f4412d0827 Docs for select cutoffs 2015-08-21 10:52:44 +01:00
José Padilla
8af366a732 Raise error when source= use on a child.
Closes #3292
2015-08-19 12:32:16 -04:00
Omer Katz
792005806b Cached the field's root and context property. 2015-08-18 12:38:13 +03:00
Tom Christie
18af181191 Fix boolean checkboxes setting to False. Closes #3258. Closes #2776. 2015-08-13 09:56:03 +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
e63dcab8b3 Fix for rendering select templates on relationships 2015-08-07 14:36:00 +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
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
38a1b3ec6b Rationalize decimal logic. Closes #3222. 2015-08-06 09:51:00 +01:00
Tom Christie
bf35906dc0 FilePathField subclassing from ChoiceField 2015-08-03 10:17:41 +01:00
Tom Christie
877e964d7e Don't need to support Django 1.4 with FilePathField. 2015-08-03 10:15:28 +01:00
Aider Ibragimov
205f388631 fix import sort order 2015-07-19 01:32:51 +03:00
Aider Ibragimov
c4f1c98572 fix lint issues 2015-07-19 01:22:57 +03:00
Aider Ibragimov
a1397ac699 fix bugs, move version branching to compat, update ModelSerializer mapping 2015-07-19 00:26:03 +03: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
0ccb148183 Support QueryDict list arguments with ListField. Closes #3155. 2015-07-16 15:59:15 +01:00
Tom Christie
264d423493 Added allow_empty flag for ListField, ListSerializer, ManyRelation, MultipleChoiceField. 2015-07-16 13:51:15 +01:00
Tom Christie
d231f36588 Support default values being used for empty HTML fields. Closes #3130. 2015-07-16 11:47:40 +01:00
Max Peterson
ee2afb83e2 Fix 1.4 tests and make flatten_choice a utility. 2015-07-03 13:56:49 +01:00
Max Peterson
56b3f19605 Add support for grouped choices.
This also adds support for mixing single and paired choices:
```
[
    ('poor', 'Poor quality'),
    'medium',
    ('good', 'Good quality'),
]
```
2015-07-03 12:27:01 +01:00
Tom Christie
c4f908d4ee Introduce datetime_parser as class level attribute on all date/time fields. Refs #3093. 2015-07-02 11:23:52 +01:00
Tom Christie
6ce9e3baf0 Remove datetime_parser argument from DateTimeField 2015-07-02 11:22:18 +01:00
Tom Christie
6d79ea2cde Merge pull request #3093 from sorreltree/master
Ability to customize DateTimeField with a custom datetime_parser
2015-07-02 11:21:25 +01:00
Tom Christie
d979dc6522 Tweak exception message 2015-07-02 10:16:43 +01:00
Tom Christie
e3c3d8826f Merge pull request #3071 from antonyc/patch-1
Made exception message more verbose
2015-07-02 10:14:01 +01:00
Michael Bacon
5f40ab53de Ability to customize DateTimeField with a custom datetime_parser 2015-06-30 14:51:47 -04: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
321133242f Unsaved file objects may not have an associated URL. 2015-06-24 14:24:19 +01:00
Tom Christie
39ece9bee0 Support allow_blank=False with trim_whitespace=True. 2015-06-24 13:32:54 +01:00
Anton Chaporgin
47acec0f9d Made exception message more verbose
This exception helps you to upgrade from 2 -> 3 and since a lot of fields may be in 2 using serializers.Field as parent class, this message should contain at least name of upgraded field to help user to grep and fix the codebase faster.
2015-06-24 11:59:49 +03:00
Tom Christie
a3d6601e09 Merge pull request #3008 from linovia/feature/ipaddress-fix
`IPAddressField` improvements
2015-06-04 14:54:50 +01:00
Tom Christie
e8cc948f6b Merge pull request #2695 from delinhabit/refactor-decimalfield
[enhancement] Refactored DecimalField to allow easier subclassing
2015-06-04 14:26:28 +01:00
Xavier Ordoquy
dee5fb5647 Merge remote-tracking branch 'reference/master' into feature/ipaddress-fix
Conflicts:
	docs/api-guide/fields.md
2015-06-04 14:21:33 +01:00
Xavier Ordoquy
0c66c7cfa6 Merge pull request #3000 from linovia/ovangle/uuid_format2
Add 'format' argument to UUIDField
2015-06-03 12:32:23 +01:00
Xavier Ordoquy
f8eacc5bc0 Merge pull request #2993 from linovia/bug/2894
MultipleChoiceField empties incorrectly on a partial update using multipart/form-data (#2894)
2015-06-01 17:48:20 +01:00
Nicolas Delaby
f701ecceb7 Add DurationField 2015-06-01 18:20:53 +02:00
Xavier Ordoquy
5c90bf9cc0 Fix for #2894 thanks to @carljm 2015-06-01 16:13:35 +01:00
Michał Hernas
e8c226c2db Fixed lint problems 2015-05-18 16:55:40 +02:00
Michał Hernas
069ea31cfb Added test ensuring DecimalField accepts 2E+2 as 200 and validates
decimal place correctly.
2015-05-18 16:42:24 +02:00
David Sanders
b7edd46313 Use simpler dict.get() rather than try/except 2015-05-16 01:01:27 +10:00
David Sanders
8e84a9f6d0 Allow invalid outputs to pass through to_representation() for ChoiceField & MultipleChoiceField 2015-05-15 18:59:10 +10:00
Ryan Allen
cbea03c85b DateField to_representation can handle str and empty values. Fixes #2656, #2687. 2015-04-23 19:31:46 -05:00
Ryan Allen
32acc4a72b Set IntegerField class variable for compiled decimal regex, comment for purpose 2015-04-21 10:52:52 -04:00