Files
django-stubs/django-stubs/db/models/fields/__init__.pyi
2018-12-20 23:27:21 +03:00

62 lines
1.9 KiB
Python

from typing import Any, Optional
from django.db.models.query_utils import RegisterLookupMixin
class Field(RegisterLookupMixin):
def __init__(self, primary_key: bool = False, **kwargs): ...
def __get__(self, instance, owner) -> Any: ...
class IntegerField(Field):
def __get__(self, instance, owner) -> int: ...
class PositiveIntegerRelDbTypeMixin:
def rel_db_type(self, connection: Any): ...
class PositiveIntegerField(PositiveIntegerRelDbTypeMixin, IntegerField): ...
class PositiveSmallIntegerField(PositiveIntegerRelDbTypeMixin, IntegerField): ...
class SmallIntegerField(IntegerField): ...
class BigIntegerField(IntegerField): ...
class AutoField(Field):
def __get__(self, instance, owner) -> int: ...
class CharField(Field):
def __init__(self, max_length: int, **kwargs): ...
def __set__(self, instance, value: str) -> None: ...
def __get__(self, instance, owner) -> str: ...
class SlugField(CharField): ...
class EmailField(CharField): ...
class TextField(Field):
def __set__(self, instance, value: str) -> None: ...
def __get__(self, instance, owner) -> str: ...
class BooleanField(Field):
def __set__(self, instance, value: bool) -> None: ...
def __get__(self, instance, owner) -> bool: ...
class NullBooleanField(BooleanField):
def __set__(self, instance, value: Optional[bool]) -> None: ...
def __get__(self, instance, owner) -> Optional[bool]: ...
class FileField(Field): ...
class IPAddressField(Field): ...
class GenericIPAddressField(Field):
default_error_messages: Any = ...
unpack_ipv4: Any = ...
protocol: Any = ...
def __init__(
self,
verbose_name: Optional[Any] = ...,
name: Optional[Any] = ...,
protocol: str = ...,
unpack_ipv4: bool = ...,
*args: Any,
**kwargs: Any
) -> None: ...
class DateField(Field): ...
class DateTimeField(DateField): ...