summaryrefslogtreecommitdiff
path: root/docs/topics/class-based-views
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2016-06-26 21:15:29 -0300
committerTim Graham <timograham@gmail.com>2016-06-27 09:26:13 -0400
commitf40c91cdef74b81f731ad1582c26d0b60044dbc2 (patch)
treed452281930fda6ff57856b805d652cd1ad9069d6 /docs/topics/class-based-views
parent4be49ff38a0ab24d202659f851e39aa1070d47ee (diff)
[1.9.x] Added missing trailing '$' to url() patterns in docs.
Backport of c962b9104a22505a7d6c57bbec9eda163f486c7d from master
Diffstat (limited to 'docs/topics/class-based-views')
-rw-r--r--docs/topics/class-based-views/index.txt4
-rw-r--r--docs/topics/class-based-views/intro.txt8
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/topics/class-based-views/index.txt b/docs/topics/class-based-views/index.txt
index dcc0784ada..91dd6ff944 100644
--- a/docs/topics/class-based-views/index.txt
+++ b/docs/topics/class-based-views/index.txt
@@ -42,7 +42,7 @@ you can simply pass them into the
from django.views.generic import TemplateView
urlpatterns = [
- url(r'^about/', TemplateView.as_view(template_name="about.html")),
+ url(r'^about/$', TemplateView.as_view(template_name="about.html")),
]
Any arguments passed to :meth:`~django.views.generic.base.View.as_view` will
@@ -79,7 +79,7 @@ views::
from some_app.views import AboutView
urlpatterns = [
- url(r'^about/', AboutView.as_view()),
+ url(r'^about/$', AboutView.as_view()),
]
diff --git a/docs/topics/class-based-views/intro.txt b/docs/topics/class-based-views/intro.txt
index 2fbbb4b63b..5cd38d57db 100644
--- a/docs/topics/class-based-views/intro.txt
+++ b/docs/topics/class-based-views/intro.txt
@@ -93,7 +93,7 @@ request to a matching method if one is defined, or raises
from myapp.views import MyView
urlpatterns = [
- url(r'^about/', MyView.as_view()),
+ url(r'^about/$', MyView.as_view()),
]
@@ -130,7 +130,7 @@ Another option is to configure class attributes as keyword arguments to the
:meth:`~django.views.generic.base.View.as_view` call in the URLconf::
urlpatterns = [
- url(r'^about/', GreetingView.as_view(greeting="G'day")),
+ url(r'^about/$', GreetingView.as_view(greeting="G'day")),
]
.. note::
@@ -245,8 +245,8 @@ The easiest place to do this is in the URLconf where you deploy your view::
from .views import VoteView
urlpatterns = [
- url(r'^about/', login_required(TemplateView.as_view(template_name="secret.html"))),
- url(r'^vote/', permission_required('polls.can_vote')(VoteView.as_view())),
+ url(r'^about/$', login_required(TemplateView.as_view(template_name="secret.html"))),
+ url(r'^vote/$', permission_required('polls.can_vote')(VoteView.as_view())),
]
This approach applies the decorator on a per-instance basis. If you