Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated TypedModelMeta ordering attribute to allow OrderBy objects #1847

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/django_stubs_ext/db/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if TYPE_CHECKING:
from typing import ClassVar, List, Literal, Sequence, Tuple, Union

from django.db.models import BaseConstraint, Index
from django.db.models import BaseConstraint, Index, OrderBy

from django_stubs_ext import StrOrPromise

Expand All @@ -26,7 +26,7 @@ class TypedModelMeta:
get_latest_by: ClassVar[Union[str, Sequence[str]]]
managed: ClassVar[bool] # default: True
order_with_respect_to: ClassVar[str]
ordering: ClassVar[Sequence[str]]
ordering: ClassVar[Sequence[Union[str, OrderBy]]]
permissions: ClassVar[List[Tuple[str, str]]]
default_permissions: ClassVar[Sequence[str]] # default: ("add", "change", "delete", "view")
proxy: ClassVar[bool] # default: False
Expand Down