Skip to content

Commit

Permalink
Add LANGUAGE_COOKIE_* settings (#1228)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Johnson <[email protected]>
  • Loading branch information
andersk and adamchainz authored Nov 4, 2022
1 parent fd1bfdf commit a007013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions django-stubs/conf/global_settings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ LANGUAGE_COOKIE_NAME: str = ...
LANGUAGE_COOKIE_AGE: Optional[int] = ...
LANGUAGE_COOKIE_DOMAIN: Optional[str] = ...
LANGUAGE_COOKIE_PATH: str = ...
LANGUAGE_COOKIE_HTTPONLY: bool = ...
LANGUAGE_COOKIE_SAMESITE: Literal["Lax", "Strict", "None", False] = ...

# If you set this to True, Django will format dates, numbers and calendars
# according to user current locale.
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/http/response.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class HttpResponseBase:
domain: Optional[str] = ...,
secure: bool = ...,
httponly: bool = ...,
samesite: Optional[Literal["Lax", "Strict", "None"]] = ...,
samesite: Optional[Literal["Lax", "Strict", "None", False]] = ...,
) -> None: ...
def setdefault(self, key: str, value: str) -> None: ...
def set_signed_cookie(self, key: str, value: str, salt: str = ..., **kwargs: Any) -> None: ...
Expand All @@ -72,7 +72,7 @@ class HttpResponseBase:
key: str,
path: str = ...,
domain: Optional[str] = ...,
samesite: Optional[Literal["Lax", "Strict", "None"]] = ...,
samesite: Optional[Literal["Lax", "Strict", "None", False]] = ...,
) -> None: ...
def make_bytes(self, value: object) -> bytes: ...
def close(self) -> None: ...
Expand Down

0 comments on commit a007013

Please sign in to comment.