summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/aggregates/mixins.py
blob: 5cfe47d96c16155124cc49be33c4be7d17164737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# RemovedInDjango70Warning: When the deprecation ends, remove completely.
import warnings

from django.utils.deprecation import RemovedInDjango70Warning


# RemovedInDjango70Warning.
class OrderableAggMixin:
    allow_order_by = True

    def __init_subclass__(cls, /, *args, **kwargs):
        warnings.warn(
            "OrderableAggMixin is deprecated. Use Aggregate and allow_order_by "
            "instead.",
            category=RemovedInDjango70Warning,
            stacklevel=1,
        )
        super().__init_subclass__(*args, **kwargs)