Skip to content

Commit 1a59756

Browse files
Model.Meta.ordering allow OrderBy objects (#1847)
Co-authored-by: Hans Aarne Liblik <[email protected]>
1 parent 706f41f commit 1a59756

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/django_stubs_ext/db/models/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
if TYPE_CHECKING:
44
from typing import ClassVar, List, Literal, Sequence, Tuple, Union
55

6-
from django.db.models import BaseConstraint, Index
6+
from django.db.models import BaseConstraint, Index, OrderBy
77

88
from django_stubs_ext import StrOrPromise
99

@@ -26,7 +26,7 @@ class TypedModelMeta:
2626
get_latest_by: ClassVar[Union[str, Sequence[str]]]
2727
managed: ClassVar[bool] # default: True
2828
order_with_respect_to: ClassVar[str]
29-
ordering: ClassVar[Sequence[str]]
29+
ordering: ClassVar[Sequence[Union[str, OrderBy]]]
3030
permissions: ClassVar[List[Tuple[str, str]]]
3131
default_permissions: ClassVar[Sequence[str]] # default: ("add", "change", "delete", "view")
3232
proxy: ClassVar[bool] # default: False

0 commit comments

Comments
 (0)