From 3f2befc93163e0666dcc4f745288b98306de4b8e Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Thu, 14 Mar 2013 20:28:24 +0100 Subject: Deprecated django.views.defaults.shortcut. --- docs/internals/deprecation.txt | 3 +++ docs/releases/1.6.txt | 17 +++++++++++++++++ docs/topics/http/urls.txt | 1 - 3 files changed, 20 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 1305d68859..c0863278b5 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -362,6 +362,9 @@ these changes. * Remove the backward compatible shims introduced to rename the attributes ``ChangeList.root_query_set`` and ``ChangeList.query_set``. +* ``django.conf.urls.shortcut`` and ``django.views.defaults.shortcut`` will be + removed. + * The following private APIs will be removed: - ``django.db.close_connection()`` diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index a44545ddf3..b4c3b70c63 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -352,3 +352,20 @@ private API, it will go through a regular deprecation path. Methods that return a ``QuerySet`` such as ``Manager.get_query_set`` or ``ModelAdmin.queryset`` have been renamed to ``get_queryset``. + +``shortcut`` view and URLconf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``shortcut`` view was moved from ``django.views.defaults`` to +``django.contrib.contentypes.views`` shortly after the 1.0 release, but the +old location was never deprecated. This oversight was corrected in Django 1.6 +and you should now use the new location. + +The URLconf ``django.conf.urls.shortcut`` was also deprecated. If you're +including it in an URLconf, simply replace:: + + (r'^prefix/', include('django.conf.urls.shortcut')), + +with:: + + (r'^prefix/(?P\d+)/(?P.*)/$', 'django.contrib.contentypes.views'), diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index c5eef8bb41..c1c52f5781 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -330,7 +330,6 @@ itself. It includes a number of other URLconfs:: (r'^comments/', include('django.contrib.comments.urls')), (r'^community/', include('django_website.aggregator.urls')), (r'^contact/', include('django_website.contact.urls')), - (r'^r/', include('django.conf.urls.shortcut')), # ... snip ... ) -- cgit v1.3