summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-01-18 13:29:33 -0500
committerTim Graham <timograham@gmail.com>2015-01-18 13:45:40 -0500
commite8191caca5fcfb819d19620d7feaac328417a3c3 (patch)
treee196dfd45898f84e972d65618c2fccb9a5026d53
parent4df91d05e8ffca15f58d09d9fd0f0ae16891565b (diff)
[1.7.x] Clarified a contrib.sites deprecation and added to 1.7 release notes.
Backport of ba27f895878bb155fefb8c1b9beee2c9f3d85b3f from master
-rw-r--r--docs/internals/deprecation.txt4
-rw-r--r--docs/ref/contrib/sites.txt8
-rw-r--r--docs/releases/1.7.txt11
3 files changed, 18 insertions, 5 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 6ead9d0d05..946a92d336 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -46,8 +46,8 @@ details on these changes.
* ``AppCommand.handle_app()`` will no longer be supported.
-* ``RequestSite`` will be located in ``django.contrib.sites.requests`` and
- ``get_current_site`` in ``django.contrib.sites.shortcuts``.
+* ``RequestSite`` and ``get_current_site()`` will no longer be importable from
+ ``django.contrib.sites.models``.
* FastCGI support via the ``runfcgi`` management command will be
removed. Please deploy your project using WSGI.
diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt
index dc6cea46bb..6f406e6d38 100644
--- a/docs/ref/contrib/sites.txt
+++ b/docs/ref/contrib/sites.txt
@@ -473,9 +473,10 @@ a fallback when the database-backed sites framework is not available.
Sets the ``name`` and ``domain`` attributes to the value of
:meth:`~django.http.HttpRequest.get_host`.
- .. versionchanged:: 1.7
+ .. deprecated:: 1.7
- This class used to be defined in ``django.contrib.sites.models``.
+ This class used to be defined in ``django.contrib.sites.models``. The
+ old import location will work until Django 1.9.
A :class:`~django.contrib.sites.requests.RequestSite` object has a similar
interface to a normal :class:`~django.contrib.sites.models.Site` object,
@@ -499,6 +500,7 @@ Finally, to avoid repetitive fallback code, the framework provides a
object or a :class:`~django.contrib.sites.requests.RequestSite` object
based on the request.
- .. versionchanged:: 1.7
+ .. deprecated:: 1.7
This function used to be defined in ``django.contrib.sites.models``.
+ The old import location will work until Django 1.9.
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index 5ed1056fdd..897fc94b8e 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -1761,6 +1761,17 @@ FastCGI support
FastCGI support via the ``runfcgi`` management command will be removed in
Django 1.9. Please deploy your project using WSGI.
+Moved objects in ``contrib.sites``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Following the app-loading refactor, two objects in
+``django.contrib.sites.models`` needed to be moved because they must be
+available without importing ``django.contrib.sites.models`` when
+``django.contrib.sites`` isn't installed. Import ``RequestSite`` from
+``django.contrib.sites.requests`` and ``get_current_site()`` from
+``django.contrib.sites.shortcuts``. The old import locations will work until
+Django 1.9.
+
.. removed-features-1.7:
Features removed in 1.7