diff --git a/docs/model-api.txt b/docs/model-api.txt index 4b0bc0d238..914d4868ae 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -1871,7 +1871,7 @@ works out the correct full URL path using the URLconf, substituting the parameters you have given into the URL. For example, if your URLconf contained a line such as:: - (r'^/people/(\d+)/$', 'people.views.details'), + (r'^people/(\d+)/$', 'people.views.details'), ...your model could have a ``get_absolute_url`` method that looked like this:: diff --git a/docs/overview.txt b/docs/overview.txt index 041ad152c7..46211432cb 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -165,9 +165,9 @@ example above:: from django.conf.urls.defaults import * urlpatterns = patterns('', - (r'^/articles/(\d{4})/$', 'mysite.views.year_archive'), - (r'^/articles/(\d{4})/(\d{2})/$', 'mysite.views.month_archive'), - (r'^/articles/(\d{4})/(\d{2})/(\d+)/$', 'mysite.views.article_detail'), + (r'^articles/(\d{4})/$', 'mysite.views.year_archive'), + (r'^articles/(\d{4})/(\d{2})/$', 'mysite.views.month_archive'), + (r'^articles/(\d{4})/(\d{2})/(\d+)/$', 'mysite.views.article_detail'), ) The code above maps URLs, as simple regular expressions, to the location of diff --git a/docs/static_files.txt b/docs/static_files.txt index b6a1d278fd..846c3eb56b 100644 --- a/docs/static_files.txt +++ b/docs/static_files.txt @@ -103,10 +103,10 @@ Do this by wrapping an ``if DEBUG`` statement around the from django.conf import settings urlpatterns = patterns('', - (r'^/articles/2003/$', 'news.views.special_case_2003'), - (r'^/articles/(?P\d{4})/$', 'news.views.year_archive'), - (r'^/articles/(?P\d{4})/(?P\d{2})/$', 'news.views.month_archive'), - (r'^/articles/(?P\d{4})/(?P\d{2})/(?P\d+)/$', 'news.views.article_detail'), + (r'^articles/2003/$', 'news.views.special_case_2003'), + (r'^articles/(?P\d{4})/$', 'news.views.year_archive'), + (r'^articles/(?P\d{4})/(?P\d{2})/$', 'news.views.month_archive'), + (r'^articles/(?P\d{4})/(?P\d{2})/(?P\d+)/$', 'news.views.article_detail'), ) if settings.DEBUG: diff --git a/docs/url_dispatch.txt b/docs/url_dispatch.txt index 402b1200b5..716686ff50 100644 --- a/docs/url_dispatch.txt +++ b/docs/url_dispatch.txt @@ -317,7 +317,7 @@ Old:: from django.conf.urls.defaults import * urlpatterns = patterns('', - (r'^/?$', 'django.views.generic.date_based.archive_index'), + (r'^$', 'django.views.generic.date_based.archive_index'), (r'^(?P\d{4})/(?P[a-z]{3})/$', 'django.views.generic.date_based.archive_month'), (r'^tag/(?P\w+)/$', 'weblog.views.tag'), ) @@ -327,7 +327,7 @@ New:: from django.conf.urls.defaults import * urlpatterns = patterns('django.views.generic.date_based', - (r'^/?$', 'archive_index'), + (r'^$', 'archive_index'), (r'^(?P\d{4})/(?P[a-z]{3})/$','archive_month'), ) @@ -392,7 +392,7 @@ dictionary of extra keyword arguments to pass to the view function. For example:: urlpatterns = patterns('blog.views', - (r'^/blog/(?P\d{4})/$', 'year_archive', {'foo': 'bar'}), + (r'^blog/(?P\d{4})/$', 'year_archive', {'foo': 'bar'}), ) In this example, for a request to ``/blog/2005/``, Django will call the