Skip to content

Commit

Permalink
Merge pull request #4044 from linovia/merge/3.3.x_to_master
Browse files Browse the repository at this point in the history
Merge the changes in 3.3.x back to master.
  • Loading branch information
xordoquy committed Apr 21, 2016
2 parents 888e5c7 + bff3beb commit 1823662
Show file tree
Hide file tree
Showing 111 changed files with 5,546 additions and 2,154 deletions.
3 changes: 0 additions & 3 deletions docs/api-guide/generic-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Typically when using the generic views, you'll override the view, and set severa
queryset = User.objects.all()
serializer_class = UserSerializer
permission_classes = (IsAdminUser,)
paginate_by = 100

For more complex cases you might also want to override various methods on the view class. For example.

Expand Down Expand Up @@ -72,8 +71,6 @@ The following attributes are used to control pagination when used with list view

* `pagination_class` - The pagination class that should be used when paginating list results. Defaults to the same value as the `DEFAULT_PAGINATION_CLASS` setting, which is `'rest_framework.pagination.PageNumberPagination'`.

Note that usage of the `paginate_by`, `paginate_by_param` and `page_kwarg` attributes are now pending deprecation. The `pagination_serializer_class` attribute and `DEFAULT_PAGINATION_SERIALIZER_CLASS` setting have been removed completely. Pagination settings should instead be controlled by overriding a pagination class and setting any configuration attributes there. See the pagination documentation for more details.

**Filtering**:

* `filter_backends` - A list of filter backend classes that should be used for filtering the queryset. Defaults to the same value as the `DEFAULT_FILTER_BACKENDS` setting.
Expand Down
51 changes: 18 additions & 33 deletions docs/api-guide/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ Default: `'rest_framework.negotiation.DefaultContentNegotiation'`

#### DEFAULT_PAGINATION_SERIALIZER_CLASS

A class the determines the default serialization style for paginated responses.
---

**This setting has been removed.**

Default: `rest_framework.pagination.PaginationSerializer`
The pagination API does not use serializers to determine the output format, and
you'll need to instead override the `get_paginated_response method on a
pagination class in order to specify how the output format is controlled.

---

#### DEFAULT_FILTER_BACKENDS

Expand All @@ -113,60 +119,39 @@ If set to `None` then generic filtering is disabled.

#### PAGINATE_BY

The default page size to use for pagination. If set to `None`, pagination is disabled by default.

Default: `None`

#### PAGINATE_BY_PARAM

---

**This setting is pending deprecation.**
**This setting has been removed.**

See the pagination documentation for further guidance on [setting the pagination style](pagination.md#modifying-the-pagination-style).

---

The name of a query parameter, which can be used by the client to override the default page size to use for pagination. If set to `None`, clients may not override the default page size.

For example, given the following settings:

REST_FRAMEWORK = {
'PAGINATE_BY': 10,
'PAGINATE_BY_PARAM': 'page_size',
}
#### PAGE_SIZE

A client would be able to modify the pagination size by using the `page_size` query parameter. For example:

GET http://example.com/api/accounts?page_size=25
The default page size to use for pagination. If set to `None`, pagination is disabled by default.

Default: `None`

#### MAX_PAGINATE_BY
#### PAGINATE_BY_PARAM

---

**This setting is pending deprecation.**
**This setting has been removed.**

See the pagination documentation for further guidance on [setting the pagination style](pagination.md#modifying-the-pagination-style).

---

The maximum page size to allow when the page size is specified by the client. If set to `None`, then no maximum limit is applied.

For example, given the following settings:
#### MAX_PAGINATE_BY

REST_FRAMEWORK = {
'PAGINATE_BY': 10,
'PAGINATE_BY_PARAM': 'page_size',
'MAX_PAGINATE_BY': 100
}
---

A client request like the following would return a paginated list of up to 100 items.
**This setting is pending deprecation.**

GET http://example.com/api/accounts?page_size=999
See the pagination documentation for further guidance on [setting the pagination style](pagination.md#modifying-the-pagination-style).

Default: `None`
---

### SEARCH_PARAM

Expand Down
72 changes: 71 additions & 1 deletion docs/topics/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can determine your currently installed version using `pip freeze`:

---

## 3.3.x series
## 3.4.x series

### 3.4

Expand All @@ -47,6 +47,38 @@ You can determine your currently installed version using `pip freeze`:
* Dropped support for EOL Django 1.7 ([#3933][gh3933])
* Fixed null foreign keys targeting UUIDField primary keys. ([#3936][gh3936])

## 3.3.x series

### 3.3.3

**Date**: [14th March 2016][3.3.3-milestone].

* Remove version string from templates. Thanks to @blag for the report and fixes. ([#3878][gh3878], [#3913][gh3913], [#3912][gh3912])
* Fixes vertical html layout for `BooleanField`. Thanks to Mikalai Radchuk for the fix. ([#3910][gh3910])
* Silenced deprecation warnings on Django 1.8. Thanks to Simon Charette for the fix. ([#3903][gh3903])
* Internationalization for authtoken. Thanks to Michael Nacharov for the fix. ([#3887][gh3887], [#3968][gh3968])
* Fix `Token` model as `abstract` when the authtoken application isn't declared. Thanks to Adam Thomas for the report. ([#3860][gh3860], [#3858][gh3858])
* Improve Markdown version compatibility. Thanks to Michael J. Schultz for the fix. ([#3604][gh3604], [#3842][gh3842])
* `QueryParameterVersioning` does not use `DEFAULT_VERSION` setting. Thanks to Brad Montgomery for the fix. ([#3833][gh3833])
* Add an explicit `on_delete` on the models. Thanks to Mads Jensen for the fix. ([#3832][gh3832])
* Fix `DateField.to_representation` to work with Python 2 unicode. Thanks to Mikalai Radchuk for the fix. ([#3819][gh3819])
* Fixed `TimeField` not handling string times. Thanks to Areski Belaid for the fix. ([#3809][gh3809])
* Avoid updates of `Meta.extra_kwargs`. Thanks to Kevin Massey for the report and fix. ([#3805][gh3805], [#3804][gh3804])
* Fix nested validation error being rendered incorrectly. Thanks to Craig de Stigter for the fix. ([#3801][gh3801])
* Document how to avoid CSRF and missing button issues with `django-crispy-forms`. Thanks to Emmanuelle Delescolle, José Padilla and Luis San Pablo for the report, analysis and fix. ([#3787][gh3787], [#3636][gh3636], [#3637][gh3637])
* Improve Rest Framework Settings file setup time. Thanks to Miles Hutson for the report and Mads Jensen for the fix. ([#3786][gh3786], [#3815][gh3815])
* Improve authtoken compatibility with Django 1.9. Thanks to S. Andrew Sheppard for the fix. ([#3785][gh3785])
* Fix `Min/MaxValueValidator` transfer from a model's `DecimalField`. Thanks to Kevin Brown for the fix. ([#3774][gh3774])
* Improve HTML title in the Browsable API. Thanks to Mike Lissner for the report and fix. ([#3769][gh3769])
* Fix `AutoFilterSet` to inherit from `default_filter_set`. Thanks to Tom Linford for the fix. ([#3753][gh3753])
* Fix transifex config to handle the new Chinese language codes. Thanks to @nypisces for the report and fix. ([#3739][gh3739])
* `DateTimeField` does not handle empty values correctly. Thanks to Mick Parker for the report and fix. ([#3731][gh3731], [#3726][gh3728])
* Raise error when setting a removed rest_framework setting. Thanks to Luis San Pablo for the fix. ([#3715][gh3715])
* Add missing csrf_token in AdminRenderer post form. Thanks to Piotr Śniegowski for the fix. ([#3703][gh3703])
* Refactored `_get_reverse_relationships()` to use correct `to_field`. Thanks to Benjamin Phillips for the fix. ([#3696][gh3696])
* Document the use of `get_queryset` for `RelatedField`. Thanks to Ryan Hiebert for the fix. ([#3605][gh3605])
* Fix empty pk detection in HyperlinkRelatedField.get_url. Thanks to @jslang for the fix ([#3962][gh3962])

### 3.3.2

**Date**: [14th December 2015][3.3.2-milestone].
Expand Down Expand Up @@ -377,6 +409,7 @@ For older release notes, [please see the version 2.x documentation][old-release-
[3.3.0-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.0+Release%22
[3.3.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.1+Release%22
[3.3.2-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.2+Release%22
[3.3.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.3+Release%22

<!-- 3.0.1 -->
[gh2013]: https://github.com/tomchristie/django-rest-framework/issues/2013
Expand Down Expand Up @@ -656,3 +689,40 @@ For older release notes, [please see the version 2.x documentation][old-release-
[gh3714]: https://github.com/tomchristie/django-rest-framework/issues/3714
[gh3718]: https://github.com/tomchristie/django-rest-framework/issues/3718
[gh3723]: https://github.com/tomchristie/django-rest-framework/issues/3723

<!-- 3.3.3 -->
[gh3968]: https://github.com/tomchristie/django-rest-framework/issues/3968
[gh3962]: https://github.com/tomchristie/django-rest-framework/issues/3962
[gh3913]: https://github.com/tomchristie/django-rest-framework/issues/3913
[gh3912]: https://github.com/tomchristie/django-rest-framework/issues/3912
[gh3910]: https://github.com/tomchristie/django-rest-framework/issues/3910
[gh3903]: https://github.com/tomchristie/django-rest-framework/issues/3903
[gh3887]: https://github.com/tomchristie/django-rest-framework/issues/3887
[gh3878]: https://github.com/tomchristie/django-rest-framework/issues/3878
[gh3860]: https://github.com/tomchristie/django-rest-framework/issues/3860
[gh3858]: https://github.com/tomchristie/django-rest-framework/issues/3858
[gh3842]: https://github.com/tomchristie/django-rest-framework/issues/3842
[gh3833]: https://github.com/tomchristie/django-rest-framework/issues/3833
[gh3832]: https://github.com/tomchristie/django-rest-framework/issues/3832
[gh3819]: https://github.com/tomchristie/django-rest-framework/issues/3819
[gh3815]: https://github.com/tomchristie/django-rest-framework/issues/3815
[gh3809]: https://github.com/tomchristie/django-rest-framework/issues/3809
[gh3805]: https://github.com/tomchristie/django-rest-framework/issues/3805
[gh3804]: https://github.com/tomchristie/django-rest-framework/issues/3804
[gh3801]: https://github.com/tomchristie/django-rest-framework/issues/3801
[gh3787]: https://github.com/tomchristie/django-rest-framework/issues/3787
[gh3786]: https://github.com/tomchristie/django-rest-framework/issues/3786
[gh3785]: https://github.com/tomchristie/django-rest-framework/issues/3785
[gh3774]: https://github.com/tomchristie/django-rest-framework/issues/3774
[gh3769]: https://github.com/tomchristie/django-rest-framework/issues/3769
[gh3753]: https://github.com/tomchristie/django-rest-framework/issues/3753
[gh3739]: https://github.com/tomchristie/django-rest-framework/issues/3739
[gh3731]: https://github.com/tomchristie/django-rest-framework/issues/3731
[gh3728]: https://github.com/tomchristie/django-rest-framework/issues/3726
[gh3715]: https://github.com/tomchristie/django-rest-framework/issues/3715
[gh3703]: https://github.com/tomchristie/django-rest-framework/issues/3703
[gh3696]: https://github.com/tomchristie/django-rest-framework/issues/3696
[gh3637]: https://github.com/tomchristie/django-rest-framework/issues/3637
[gh3636]: https://github.com/tomchristie/django-rest-framework/issues/3636
[gh3605]: https://github.com/tomchristie/django-rest-framework/issues/3605
[gh3604]: https://github.com/tomchristie/django-rest-framework/issues/3604
3 changes: 3 additions & 0 deletions requirements/requirements-packaging.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ twine==1.4.0

# Transifex client for managing translation resources.
transifex-client==0.11

# Pandoc to have a nice pypi page
pypandoc
2 changes: 1 addition & 1 deletion rest_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

__title__ = 'Django REST framework'
__version__ = '3.3.2'
__version__ = '3.3.3'
__author__ = 'Tom Christie'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2011-2016 Tom Christie'
Expand Down
34 changes: 34 additions & 0 deletions rest_framework/authtoken/migrations/0002_auto_20160226_1747.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('authtoken', '0001_initial'),
]

operations = [
migrations.AlterModelOptions(
name='token',
options={'verbose_name_plural': 'Tokens', 'verbose_name': 'Token'},
),
migrations.AlterField(
model_name='token',
name='created',
field=models.DateTimeField(verbose_name='Created', auto_now_add=True),
),
migrations.AlterField(
model_name='token',
name='key',
field=models.CharField(verbose_name='Key', max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='token',
name='user',
field=models.OneToOneField(to=settings.AUTH_USER_MODEL, verbose_name='User', related_name='auth_token'),
),
]
Binary file modified rest_framework/locale/ach/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 1823662

Please sign in to comment.