Add db_collation parameter to CharField and TextField (#621)

* Add db_collation parameter to CharField

* Add db_collation parameter to TextField
This commit is contained in:
Y. Kiuchi
2021-05-24 17:22:07 +09:00
committed by GitHub
parent 353b790209
commit 2f84d2e904

View File

@@ -226,6 +226,7 @@ class CharField(Field[_ST, _GT]):
db_tablespace: Optional[str] = ...,
validators: Iterable[_ValidatorCallable] = ...,
error_messages: Optional[_ErrorMessagesToOverride] = ...,
db_collation: Optional[str] = ...,
): ...
class SlugField(CharField[_ST, _GT]):
@@ -263,6 +264,31 @@ class TextField(Field[_ST, _GT]):
_pyi_private_get_type: str
# objects are converted to string before comparison
_pyi_lookup_exact_type: Any
def __init__(
self,
verbose_name: Optional[Union[str, bytes]] = ...,
name: Optional[str] = ...,
primary_key: bool = ...,
max_length: Optional[int] = ...,
unique: bool = ...,
blank: bool = ...,
null: bool = ...,
db_index: bool = ...,
default: Any = ...,
editable: bool = ...,
auto_created: bool = ...,
serialize: bool = ...,
unique_for_date: Optional[str] = ...,
unique_for_month: Optional[str] = ...,
unique_for_year: Optional[str] = ...,
choices: Optional[_FieldChoices] = ...,
help_text: str = ...,
db_column: Optional[str] = ...,
db_tablespace: Optional[str] = ...,
validators: Iterable[_ValidatorCallable] = ...,
error_messages: Optional[_ErrorMessagesToOverride] = ...,
db_collation: Optional[str] = ...,
): ...
class BooleanField(Field[_ST, _GT]):
_pyi_private_set_type: Union[bool, Combinable]