From 2f84d2e9043a74592b8371c55f1b6b1fc8f8a1f2 Mon Sep 17 00:00:00 2001 From: "Y. Kiuchi" <32252655+ykiu@users.noreply.github.com> Date: Mon, 24 May 2021 17:22:07 +0900 Subject: [PATCH] Add `db_collation` parameter to `CharField` and `TextField` (#621) * Add db_collation parameter to CharField * Add db_collation parameter to TextField --- django-stubs/db/models/fields/__init__.pyi | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/django-stubs/db/models/fields/__init__.pyi b/django-stubs/db/models/fields/__init__.pyi index 6dc2a5c..685b0be 100644 --- a/django-stubs/db/models/fields/__init__.pyi +++ b/django-stubs/db/models/fields/__init__.pyi @@ -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]