mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 04:54:48 +08:00
12 lines
284 B
Python
12 lines
284 B
Python
from django.contrib.sites.models import Site
|
|
from django.contrib.sites.requests import RequestSite
|
|
from django.http.request import HttpRequest
|
|
from typing import (
|
|
Optional,
|
|
Union,
|
|
)
|
|
|
|
|
|
def get_current_site(
|
|
request: Optional[HttpRequest]
|
|
) -> Union[RequestSite, Site]: ... |