mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 13:04:47 +08:00
30 lines
801 B
Python
30 lines
801 B
Python
from typing import Any, Optional, Tuple, Type
|
|
|
|
from django.db import models
|
|
from django.http.request import HttpRequest
|
|
|
|
SITE_CACHE: Any
|
|
|
|
class SiteManager(models.Manager):
|
|
creation_counter: int
|
|
model: None
|
|
name: None
|
|
use_in_migrations: bool = ...
|
|
def get_current(self, request: Optional[HttpRequest] = ...) -> Site: ...
|
|
def clear_cache(self) -> None: ...
|
|
def get_by_natural_key(self, domain: str) -> Site: ...
|
|
|
|
class Site(models.Model):
|
|
id: int
|
|
domain: str = ...
|
|
name: str = ...
|
|
objects: Any = ...
|
|
class Meta:
|
|
db_table: str = ...
|
|
verbose_name: Any = ...
|
|
verbose_name_plural: Any = ...
|
|
ordering: Any = ...
|
|
def natural_key(self) -> Tuple[str]: ...
|
|
|
|
def clear_site_cache(sender: Type[Site], **kwargs: Any) -> None: ...
|