mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
initial commit
This commit is contained in:
29
django/contrib/sessions/backends/db.pyi
Normal file
29
django/contrib/sessions/backends/db.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
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: ...
|
||||
Reference in New Issue
Block a user