Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed a few typos and updated an example in the URLs docs.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9d7b5558ee21bd047c1b3845d4af7540000476bf 1 parent 5b37a02
Aymeric Augustin authored February 16, 2012

Showing 1 changed file with 15 additions and 13 deletions. Show diff stats Hide diff stats

  1. 28  docs/topics/http/urls.txt
28  docs/topics/http/urls.txt
@@ -278,7 +278,7 @@ Error handling
278 278
 
279 279
 When Django can't find a regex matching the requested URL, or when an
280 280
 exception is raised, Django will invoke an error-handling view. The
281  
-views to use for these cases are specified by two variables which can
  281
+views to use for these cases are specified by three variables which can
282 282
 be set in your root URLconf. Setting these variables in any other
283 283
 URLconf will have no effect.
284 284
 
@@ -291,8 +291,8 @@ handler403
291 291
 .. data:: handler403
292 292
 
293 293
 A callable, or a string representing the full Python import path to the view
294  
-that should be called if the user has no the permissions required to access
295  
-a resource.
  294
+that should be called if the user doesn't have the permissions required to
  295
+access a resource.
296 296
 
297 297
 By default, this is ``'django.views.defaults.permission_denied'``. That default
298 298
 value should suffice.
@@ -440,15 +440,18 @@ Including other URLconfs
440 440
 At any point, your ``urlpatterns`` can "include" other URLconf modules. This
441 441
 essentially "roots" a set of URLs below other ones.
442 442
 
443  
-For example, here's the URLconf for the `Django Web site`_ itself. It includes a
444  
-number of other URLconfs::
  443
+For example, here's an except of the URLconf for the `Django Web site`_
  444
+itself. It includes a number of other URLconfs::
445 445
 
446 446
     from django.conf.urls import patterns, url, include
447 447
 
448 448
     urlpatterns = patterns('',
449  
-        (r'^weblog/',        include('django_website.apps.blog.urls.blog')),
450  
-        (r'^documentation/', include('django_website.apps.docs.urls.docs')),
451  
-        (r'^comments/',      include('django.contrib.comments.urls')),
  449
+        # ... snip ...
  450
+        (r'^comments/', include('django.contrib.comments.urls')),
  451
+        (r'^community/', include('django_website.aggregator.urls')),
  452
+        (r'^contact/', include('django_website.contact.urls')),
  453
+        (r'^r/', include('django.conf.urls.shortcut')),
  454
+        # ... snip ...
452 455
     )
453 456
 
454 457
 Note that the regular expressions in this example don't have a ``$``
@@ -469,8 +472,8 @@ directly the pattern list as returned by `patterns`_ instead. For example::
469 472
     )
470 473
 
471 474
     urlpatterns = patterns('',
472  
-        url(r'^$',    'apps.main.views.homepage', name='site-homepage'),
473  
-        (r'^help/',   include('apps.help.urls')),
  475
+        url(r'^$', 'apps.main.views.homepage', name='site-homepage'),
  476
+        (r'^help/', include('apps.help.urls')),
474 477
         (r'^credit/', include(extra_patterns)),
475 478
     )
476 479
 
@@ -972,9 +975,8 @@ A :class:`ResolverMatch` object can also be assigned to a triple::
972 975
     the :class:`ResolverMatch` object (as well as the namespace and pattern
973 976
     information it provides) is not available in earlier Django releases.
974 977
 
975  
-One possible use of :func:`~django.core.urlresolvers.resolve` would be
976  
-to testing if a view would raise a ``Http404`` error before
977  
-redirecting to it::
  978
+One possible use of :func:`~django.core.urlresolvers.resolve` would be to test
  979
+if a view would raise a ``Http404`` error before redirecting to it::
978 980
 
979 981
     from urlparse import urlparse
980 982
     from django.core.urlresolvers import resolve

0 notes on commit 9d7b555

Please sign in to comment.
Something went wrong with that request. Please try again.