Skip to content

Commit a007013

Browse files
anderskadamchainz
andauthored
Add LANGUAGE_COOKIE_* settings (#1228)
Co-authored-by: Adam Johnson <[email protected]>
1 parent fd1bfdf commit a007013

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

django-stubs/conf/global_settings.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ LANGUAGE_COOKIE_NAME: str = ...
6161
LANGUAGE_COOKIE_AGE: Optional[int] = ...
6262
LANGUAGE_COOKIE_DOMAIN: Optional[str] = ...
6363
LANGUAGE_COOKIE_PATH: str = ...
64+
LANGUAGE_COOKIE_HTTPONLY: bool = ...
65+
LANGUAGE_COOKIE_SAMESITE: Literal["Lax", "Strict", "None", False] = ...
6466

6567
# If you set this to True, Django will format dates, numbers and calendars
6668
# according to user current locale.

django-stubs/http/response.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class HttpResponseBase:
6363
domain: Optional[str] = ...,
6464
secure: bool = ...,
6565
httponly: bool = ...,
66-
samesite: Optional[Literal["Lax", "Strict", "None"]] = ...,
66+
samesite: Optional[Literal["Lax", "Strict", "None", False]] = ...,
6767
) -> None: ...
6868
def setdefault(self, key: str, value: str) -> None: ...
6969
def set_signed_cookie(self, key: str, value: str, salt: str = ..., **kwargs: Any) -> None: ...
@@ -72,7 +72,7 @@ class HttpResponseBase:
7272
key: str,
7373
path: str = ...,
7474
domain: Optional[str] = ...,
75-
samesite: Optional[Literal["Lax", "Strict", "None"]] = ...,
75+
samesite: Optional[Literal["Lax", "Strict", "None", False]] = ...,
7676
) -> None: ...
7777
def make_bytes(self, value: object) -> bytes: ...
7878
def close(self) -> None: ...

0 commit comments

Comments
 (0)