Tom Christie
264d423493
Added allow_empty flag for ListField, ListSerializer, ManyRelation, MultipleChoiceField.
2015-07-16 13:51:15 +01:00
Tom Christie
a8acdbc388
Resolve issue with nested serializers in HTML forms. Closes #3153 .
2015-07-16 12:04:38 +01:00
Tom Christie
d231f36588
Support default values being used for empty HTML fields. Closes #3130 .
2015-07-16 11:47:40 +01:00
Tom Christie
7315ed8b00
Resolve browsable API form issues with nested serializers. Closes #3153 .
2015-07-16 10:49:00 +01:00
Tom Christie
c879aaf398
page_size needs to be stored as state on CursorPagination. Refs 3147.
2015-07-16 10:26:16 +01:00
Tom Christie
a9f1d99cb5
Fix 'metadata' action on viewsets. Closes #3158 . Closes #3157 . Closes #3115 .
2015-07-16 10:08:22 +01: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
Tom Christie
c14ad7add7
Handle .choices for related fields when queryset argument is actually a mamanger instance. Closes #3145 .
2015-07-14 13:31:24 +01:00
Tom Christie
1b51bcdbae
Merge branch 'master' of github.com:tomchristie/django-rest-framework
2015-07-14 13:21:20 +01:00
Tom Christie
bca2ea35df
Ensure that realtionship fields '.choices' returns an empty dict when accessed with a read-only field. Closes #2910 .
2015-07-14 13:21:08 +01:00
Tom Christie
9c952dcfe9
Merge pull request #3147 from tomchristie/uploadcare-cursor-limits
...
Add `get_page_size` hook to `CursorPagination`
2015-07-14 12:44:13 +01:00
Tom Christie
468361425d
page_size should be local, not overwriting class attribute.
2015-07-14 12:32:27 +01:00
Tom Christie
3c57e08f62
Clarifications to read_only fields. Closes #3064 .
2015-07-14 12:22:51 +01:00
Tom Christie
2b51d5594b
Remove whitespace and comment changes
2015-07-14 11:41:25 +01:00
Tom Christie
14a32ae32d
Add get_page_size hook to CursorPagination. Closes #3068 .
2015-07-14 11:40:15 +01:00
Tom Christie
1d012aeb93
Merge branch 'cursor-limits' of https://github.com/uploadcare/django-rest-framework into uploadcare-cursor-limits
2015-07-14 11:37:18 +01:00
Tom Christie
209bcb9087
Added url_field_name class attribute to ModelSerializer. Closes #3106 .
2015-07-14 11:21:33 +01:00
Tom Christie
538ffaf6c7
Store self.action='metadata' for OPTIONS requests on viewsets. Closes #3115 .
2015-07-14 11:13:26 +01:00
homm
a3afcfb6d3
duplicate get_page_size
and related properties from PageNumberPagination
2015-07-13 14:44:48 +03:00
homm
59905e9335
revert BasePageSizePagination class and CursorPagination inheritance
2015-07-13 14:36:47 +03:00
Juan Gutierrez
b0c5f9db2f
allow a non-required nested serializer to validate correctly when receiving multipart data
2015-07-03 12:28:48 -04:00
Julien Syx
2b979d4356
Adding recursion on child of List Field
2015-07-02 14:15:43 +02:00
Tom Christie
8d69c4c068
Improve OPTIONS descriptions for lists dicts and nested serializers
2015-07-02 12:55:42 +01:00
Tom Christie
e6ca0fcb4c
Remove erronous newline
2015-07-02 11:53:05 +01:00
Tom Christie
37815920e3
Update to master and tweak remaining issues
2015-07-02 11:50:40 +01:00
Tom Christie
055986b5b0
More helpful exception when URL cannot reverse and field value was empty. Closes #2698 .
2015-07-02 11:36:14 +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
fb4233736f
Empty settings should also be coerced to lists. Closes #3087 .
2015-07-02 10:28:46 +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
Tom Christie
39ed03c21c
Merge pull request #3088 from atleta/master
...
Handle AttributeError as well (when the imported module exists but the specified function/class does not).
2015-07-02 09:52:53 +01:00
Tyler Redzko
af08c70242
Update extra_kwargs on model serializer
...
Ensures that the 'read_only' and 'required' keys from `extra_kwargs` are
retained when present. Closes #3091 .
2015-07-01 10:10:18 -04:00
Michael Bacon
5f40ab53de
Ability to customize DateTimeField with a custom datetime_parser
2015-06-30 14:51:47 -04:00
Laszlo Marai
f0bced6413
Handle AttributeError as well (when the imported module exists but
...
the specified function/class does not).
2015-06-30 05:49:44 +02:00
Venelin Stoykov
c3c9a712fa
Fix ManyRelatedField.choices
...
Use choices from self.child_relation.
We don't need to repeat ourself because can get out of sync.
2015-06-29 15:35:55 +03: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
Shtarev
e8b23c4789
thin logic
2015-06-25 21:14:00 +03:00
Tom Christie
47765bc429
Merge pull request #3034 from m-vellinga/master
...
Use get_queryset() for RelatedField choices property
2015-06-25 16:41:43 +01:00
José Padilla
d6e30c75ff
Add test and fix for #2704
2015-06-25 09:35:36 -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
Tom Christie
8329411cc3
Merge pull request #2539 from donewell/permission-detail
...
add message to custom permission
2015-06-24 11:32:02 +01:00
Tom Christie
8d4c96ecd6
Merge pull request #3012 from jannon/fix-allow-blank-mapping
...
only include 'allow_blank' on supported fields
2015-06-24 11:01:10 +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
homm
30b36a594f
use PageSizePaginationMixin for CursorPagination
...
tests for custom page_size in CursorPagination
2015-06-23 19:14:10 +03:00
homm
60656e9182
merge CursorPagination.decode_cursor
and _decode_cursor
...
merge `CursorPagination.encode_cursor` and `_encode_cursor`
2015-06-23 19:00:42 +03:00