summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/model-api.txt2
-rw-r--r--docs/overview.txt6
-rw-r--r--docs/static_files.txt8
-rw-r--r--docs/url_dispatch.txt6
4 files changed, 11 insertions, 11 deletions
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<year>\d{4})/$', 'news.views.year_archive'),
- (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
- (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/$', 'news.views.article_detail'),
+ (r'^articles/2003/$', 'news.views.special_case_2003'),
+ (r'^articles/(?P<year>\d{4})/$', 'news.views.year_archive'),
+ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
+ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\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<year>\d{4})/(?P<month>[a-z]{3})/$', 'django.views.generic.date_based.archive_month'),
(r'^tag/(?P<tag>\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<year>\d{4})/(?P<month>[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<year>\d{4})/$', 'year_archive', {'foo': 'bar'}),
+ (r'^blog/(?P<year>\d{4})/$', 'year_archive', {'foo': 'bar'}),
)
In this example, for a request to ``/blog/2005/``, Django will call the