mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Moved RequestSite and get_current_site.
Following the app-loading refactor, these objects must live outside of django.contrib.sites.models because they must be available without importing the django.contrib.sites.models module when django.contrib.sites isn't installed. Refs #21680. Thanks Carl and Loic for reporting this issue.
This commit is contained in:
parent
ca95f8e435
commit
9ffab9cee1
23 changed files with 137 additions and 76 deletions
|
@ -648,7 +648,7 @@ patterns.
|
|||
* ``site``: The current :class:`~django.contrib.sites.models.Site`,
|
||||
according to the :setting:`SITE_ID` setting. If you don't have the
|
||||
site framework installed, this will be set to an instance of
|
||||
:class:`~django.contrib.sites.models.RequestSite`, which derives the
|
||||
:class:`~django.contrib.sites.requests.RequestSite`, which derives the
|
||||
site name and domain from the current
|
||||
:class:`~django.http.HttpRequest`.
|
||||
|
||||
|
@ -744,7 +744,7 @@ patterns.
|
|||
* ``site``: The current :class:`~django.contrib.sites.models.Site`,
|
||||
according to the :setting:`SITE_ID` setting. If you don't have the
|
||||
site framework installed, this will be set to an instance of
|
||||
:class:`~django.contrib.sites.models.RequestSite`, which derives the
|
||||
:class:`~django.contrib.sites.requests.RequestSite`, which derives the
|
||||
site name and domain from the current
|
||||
:class:`~django.http.HttpRequest`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue