Skip to content

Commit

Permalink
Point Meta.together deprecation to Meta.groups
Browse files Browse the repository at this point in the history
  • Loading branch information
rpkilby committed Jan 28, 2020
1 parent d6b2bf2 commit bf3689f
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/guide/migration.txt
Expand Up @@ -72,9 +72,19 @@ FilterSet ``Meta.together`` option removed (`#791`__)
-----------------------------------------------------
__ https://github.com/carltongibson/django-filter/pull/791

The ``Meta.together`` has been deprecated in favor of userland implementations
that override the ``clean`` method of the ``Meta.form`` class. An example will
be provided in a "recipes" section in future docs.
The ``Meta.together`` has been deprecated, and has now been replaced by the
``Meta.groups`` option, which provides a more generic and flexible interface.
For more information, see the :doc:`group reference </ref/groups>`.

.. code-block:: python

class ProductFilter(django_filters.FilterSet):
class Meta:
model = Product
fields = ['price', 'release_date', 'rating']
groups = [
RequiredGroup(['rating', 'price']),
]


FilterSet "strictness" handling moved to view (`#788`__)
Expand Down

0 comments on commit bf3689f

Please sign in to comment.