freebie/venv/lib/python3.12/site-packages/django/contrib/postgres/aggregates/mixins.py
2026-09-17 12:51:39 +05:00

18 lines
549 B
Python

# 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)