/usr/share/cagefs-skeleton/usr/local/lib/python3.9/site-packages/django/contrib/sites
from django.apps import apps from .requests import RequestSite def get_current_site(request): """ Check if contrib.sites is installed and return either the current ``Site`` object or a ``RequestSite`` object based on the request. """ # Import is inside the function because its point is to avoid importing the # Site models when django.contrib.sites isn't installed. if apps.is_installed("django.contrib.sites"): from .models import Site return Site.objects.get_current(request) else: return RequestSite(request)
.
Edit
..
Edit
__init__.py
Edit
__pycache__
Edit
admin.py
Edit
apps.py
Edit
checks.py
Edit
locale
Edit
management.py
Edit
managers.py
Edit
middleware.py
Edit
migrations
Edit
models.py
Edit
requests.py
Edit
shortcuts.py
Edit