mirror of
https://github.com/django/django.git
synced 2025-10-27 15:46:10 +00:00
Fixed #29703 -- Deprecated QuerySetPaginator alias.
Unused since 4406d283e1.
This commit is contained in:
@@ -3,6 +3,7 @@ import inspect
|
||||
import warnings
|
||||
from math import ceil
|
||||
|
||||
from django.utils.deprecation import RemovedInDjango31Warning
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.inspect import method_has_no_args
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
@@ -125,7 +126,14 @@ class Paginator:
|
||||
)
|
||||
|
||||
|
||||
QuerySetPaginator = Paginator # For backwards-compatibility.
|
||||
class QuerySetPaginator(Paginator):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn(
|
||||
'The QuerySetPaginator alias of Paginator is deprecated.',
|
||||
RemovedInDjango31Warning, stacklevel=2,
|
||||
)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class Page(collections.abc.Sequence):
|
||||
|
||||
Reference in New Issue
Block a user