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:
Aymeric Augustin 2014-01-25 21:54:25 +01:00
parent ca95f8e435
commit 9ffab9cee1
23 changed files with 137 additions and 76 deletions

View file

@ -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`.