expressions

This commit is contained in:
Maxim Kurnikov
2019-02-03 20:41:27 +03:00
parent 2a6a0120a9
commit f5135dac9f
5 changed files with 61 additions and 30 deletions

View File

@@ -32,6 +32,8 @@ from django.db.models.fields.reverse_related import (
)
from django.db.models.query_utils import PathInfo, Q
from django.db.models.expressions import F
if TYPE_CHECKING:
from django.db.models.manager import RelatedManager
@@ -102,6 +104,7 @@ class ForeignObject(RelatedField):
class ForeignKey(RelatedField, Generic[_T]):
def __init__(self, to: Union[Type[_T], str], on_delete: Any, related_name: str = ..., **kwargs): ...
def __set__(self, instance, value: Union[Model, F]) -> None: ...
def __get__(self, instance, owner) -> _T: ...
class OneToOneField(RelatedField, Generic[_T]):