-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Version 3.0 #1800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Version 3.0 #1800
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`paginate_queryset` no longer takes an optional `page_size` argument.
Remove the shortcut `.model` view attribute usage from test cases.
`MultipleObjectAPIView` and `SingleObjectAPIView` are no longer required.
Fixed some typos in 3.0 release notes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The 3.0 release notes are available here.
Discussion group thread on 3.0 changes... https://groups.google.com/forum/#!topic/django-rest-framework/24rSIFWEJoI
To do:
unique
,unique_together
..validate()
method on fields.FileField
andImageField
.ListField
vsListSerializer
.many
,partial
,context
.request.data
andrequest.query_params
.many=True
on relational fields.extra_kwargs
.NotImplementedError
by default on field to/from methods.to_representation()
andto_internal_value()
renaming.MethodField
back toSerializerMethodField
, support optional method argument.NON_FIELD_ERRORS
get a consistent key name in responses.label
keyword argument when its default would be correct.lookup_class
to raise KeyError, andModelField.field_mapping
to includemodels.Field: ModelField
mapping..all() behavior instead of
._clone()`, here.DecimalField
- required args, andcoerce_to_string
behaviour.validators.EMPTY_VALUES
ModelSerializer
vsHyperlinkedModelSerializer
Second pass:
ListField
,ManyRelation
,ListSerializer
.test_lists.py
from core serializers.unique_for_date
.source=<field_name>
andmethod_name=get_<field_name>
-> PendingDeprecation, not assert.transform_<field>()
.validate
returning value or not?min_value
,max_value
on integer fields. (See also django-12030, and associated PR.)ManyRelation
orListSerializer
.empty
/initial
on fields and empty serializer data.datetime
being passed toTimeField
orDateField
.NullBooleanField
.metadata()
API.partial
support.Documentation:
DateTimeField
/DateField
/TimeField
now that format default has changed.NullBooleanField
ListField
/ListSerializer
min_value
/max_value
on integer type fields, as per django/django@1506c71widget
and documentstyle
.Nice to haves:
Meta
ValidationFailed
to useerrors
, notdetail
?ReadOnlyField
automatically based onfields
attribute.source
==field_name
.SerializerMethodField
argument is ==get_{field_name}
fields
includes something that is not a field, reverse relationship or simple model method.Later:
.create()
or.update()
methods are not sufficient.many=True
.ModelSerializer
/HyperlinkedModelSerializer
.initial
as0
/0.0
/'0'
for JSON integer fields, but blank string in form.unique_for_date
andsource
argument.unique_for_date
on relationships.Closes #1263.
Closes #1358.
Closes #1368.
Closes #1521.
Closes #1773.
Closes #1774.
Closes #1775.
Closes #1799.
Closes #1801.
Closes #1802.
Closes #1823.
Closes #1848.
Closes #1889.