mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
29 lines
987 B
Python
29 lines
987 B
Python
from datetime import datetime
|
|
from django.contrib.sessions.base_session import AbstractBaseSession
|
|
from django.contrib.sessions.models import Session
|
|
from typing import (
|
|
Dict,
|
|
Optional,
|
|
Type,
|
|
Union,
|
|
)
|
|
|
|
|
|
class SessionStore:
|
|
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
|
def _get_session_from_db(self) -> Optional[AbstractBaseSession]: ...
|
|
@classmethod
|
|
def clear_expired(cls) -> None: ...
|
|
def create(self) -> None: ...
|
|
def create_model_instance(
|
|
self,
|
|
data: Dict[str, Union[int, str, datetime]]
|
|
) -> AbstractBaseSession: ...
|
|
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
|
def exists(self, session_key: Optional[str]) -> bool: ...
|
|
@classmethod
|
|
def get_model_class(cls) -> Type[Session]: ...
|
|
def load(self) -> Dict[str, Union[str, int]]: ...
|
|
@cached_property
|
|
def model(self) -> Type[AbstractBaseSession]: ...
|
|
def save(self, must_create: bool = ...) -> None: ... |