diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2011-09-11 22:36:16 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2011-09-11 22:36:16 +0000 |
| commit | 26b812208751edf87b4df0aee00996c5c7bcd4c9 (patch) | |
| tree | 0857822a7dbd27f459b9dfe2075bf194a3e16ce8 /docs/ref | |
| parent | fd9045346286208c0dbd0afc1f820e868910dac8 (diff) | |
Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
This applies to both our own [test] code and documentation examples. Also:
* Moved the functions and handlers from `django.conf.urls.defaults` up to
`django.conf.urls` deprecating the former module.
* Added documentation for `handler403`.
* Tweaked the URLs topic document a bit.
Thanks to pupeno and cdestigter for their great work contributing patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 6 | ||||
| -rw-r--r-- | docs/ref/contrib/comments/example.txt | 4 | ||||
| -rw-r--r-- | docs/ref/contrib/formtools/form-wizard.txt | 6 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/tutorial.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/sitemaps.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/syndication.txt | 4 | ||||
| -rw-r--r-- | docs/ref/models/instances.txt | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index e280463f8c..bdbe61505d 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1831,7 +1831,7 @@ In this example, we register the default ``AdminSite`` instance ``django.contrib.admin.site`` at the URL ``/admin/`` :: # urls.py - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() @@ -1847,7 +1847,7 @@ In this example, we register the ``AdminSite`` instance ``myproject.admin.admin_site`` at the URL ``/myadmin/`` :: # urls.py - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from myproject.admin import admin_site urlpatterns = patterns('', @@ -1871,7 +1871,7 @@ separate versions of the admin site -- using the ``AdminSite`` instances respectively:: # urls.py - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from myproject.admin import basic_site, advanced_site urlpatterns = patterns('', diff --git a/docs/ref/contrib/comments/example.txt b/docs/ref/contrib/comments/example.txt index 253701b8da..82ae08e66d 100644 --- a/docs/ref/contrib/comments/example.txt +++ b/docs/ref/contrib/comments/example.txt @@ -143,7 +143,7 @@ enable it in your project's ``urls.py``: .. code-block:: python - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from django.contrib.comments.feeds import LatestCommentFeed urlpatterns = patterns('', @@ -161,7 +161,7 @@ syndication feed view: .. code-block:: python - from django.conf.urls.defaults import * + from django.conf.urls import patterns from django.contrib.comments.feeds import LatestCommentFeed feeds = { diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt index 2645c28a32..24f81e244d 100644 --- a/docs/ref/contrib/formtools/form-wizard.txt +++ b/docs/ref/contrib/formtools/form-wizard.txt @@ -217,7 +217,7 @@ deploy the new :class:`WizardView` object a URL in the ``urls.py``. The wizard's :meth:`as_view` method takes a list of your :class:`~django.forms.Form` classes as an argument during instantiation:: - from django.conf.urls.defaults import patterns + from django.conf.urls import patterns from myapp.forms import ContactForm1, ContactForm2 from myapp.views import ContactWizard @@ -525,7 +525,7 @@ We define our wizard in a ``views.py``:: We need to add the ``ContactWizard`` to our ``urls.py`` file:: - from django.conf.urls.defaults import pattern + from django.conf.urls import pattern from myapp.forms import ContactForm1, ContactForm2 from myapp.views import ContactWizard, show_message_form_condition @@ -572,7 +572,7 @@ Additionally you have to pass two more arguments to the Example code for the changed ``urls.py`` file:: - from django.conf.urls.defaults import url, patterns + from django.conf.urls import url, patterns from myapp.forms import ContactForm1, ContactForm2 from myapp.views import ContactWizard diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt index bf6a037097..5138c4092a 100644 --- a/docs/ref/contrib/gis/tutorial.txt +++ b/docs/ref/contrib/gis/tutorial.txt @@ -697,7 +697,7 @@ Let's dive in again -- create a file called ``admin.py`` inside the Next, edit your ``urls.py`` in the ``geodjango`` project folder to look as follows:: - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from django.contrib.gis import admin admin.autodiscover() diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index 300c142f0b..ecc5024877 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -241,7 +241,7 @@ Example Here's an example of a :doc:`URLconf </topics/http/urls>` using both:: - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap from blog.models import Entry diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt index 398f6ca4cb..bbc58cef55 100644 --- a/docs/ref/contrib/syndication.txt +++ b/docs/ref/contrib/syndication.txt @@ -80,7 +80,7 @@ latest five news items:: To connect a URL to this feed, put an instance of the Feed object in your :doc:`URLconf </topics/http/urls>`. For example:: - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from myproject.feeds import LatestEntriesFeed urlpatterns = patterns('', @@ -327,7 +327,7 @@ Here's a full example:: And the accompanying URLconf:: - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include from myproject.feeds import RssSiteNewsFeed, AtomSiteNewsFeed urlpatterns = patterns('', diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 8809eaf86a..4ab9dd3011 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -524,7 +524,7 @@ pattern, it's possible to give a name to a pattern, and then reference the name rather than the view function. A named URL pattern is defined by replacing the pattern tuple by a call to the ``url`` function):: - from django.conf.urls.defaults import * + from django.conf.urls import patterns, url, include url(r'^people/(\d+)/$', 'blog_views.generic_detail', name='people_view'), |
