-
-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SessionBase methods, change SessionStore.get_model_class() return (…
…#1517) Improve typing in `contrib.session.backends` Co-authored-by: Marti Raudsepp <[email protected]>
- Loading branch information
1 parent
99c8fcc
commit 2d27ba6
Showing
2 changed files
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
from django.contrib.sessions.backends.base import SessionBase | ||
from django.contrib.sessions.base_session import AbstractBaseSession | ||
from django.contrib.sessions.models import Session | ||
from django.db.models.base import Model | ||
|
||
class SessionStore(SessionBase): | ||
def __init__(self, session_key: str | None = ...) -> None: ... | ||
@classmethod | ||
def get_model_class(cls) -> type[Session]: ... | ||
def get_model_class(cls) -> type[AbstractBaseSession]: ... | ||
@property | ||
def model(self) -> type[AbstractBaseSession]: ... | ||
def create_model_instance(self, data: dict[str, Model]) -> AbstractBaseSession: ... |