mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
from datetime import datetime
|
|
from typing import Any, Dict, Optional, Type, Union
|
|
|
|
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):
|
|
accessed: bool
|
|
serializer: Type[django.core.signing.JSONSerializer]
|
|
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
|
@classmethod
|
|
def get_model_class(cls) -> Type[Session]: ...
|
|
def model(self) -> Type[AbstractBaseSession]: ...
|
|
def load(self) -> Dict[str, Union[Model, str, int]]: ...
|
|
def exists(self, session_key: Optional[str]) -> bool: ...
|
|
modified: bool = ...
|
|
def create(self) -> None: ...
|
|
def create_model_instance(
|
|
self, data: Dict[str, Union[int, str, Model, datetime]]
|
|
) -> AbstractBaseSession: ...
|
|
def save(self, must_create: bool = ...) -> None: ...
|
|
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
|
@classmethod
|
|
def clear_expired(cls) -> None: ...
|