diff --git a/AUTHORS b/AUTHORS index 7d80c69c55..dbeb3e9e61 100644 --- a/AUTHORS +++ b/AUTHORS @@ -686,6 +686,7 @@ answer newbie questions, and generally made Django that much better: Terry Huang thebjorn Thejaswi Puthraya + Thijs van Dien Thomas Chaumeny Thomas Güttler Thomas Kerpe diff --git a/docs/ref/urlresolvers.txt b/docs/ref/urlresolvers.txt index 116aa4fcd0..c9a1cf3af3 100644 --- a/docs/ref/urlresolvers.txt +++ b/docs/ref/urlresolvers.txt @@ -17,12 +17,12 @@ callable view object. For example, given the following ``url``:: from news import views - url(r'^archive/$', views.archive, name='news_archive') + url(r'^archive/$', views.archive, name='news-archive') you can use any of the following to reverse the URL:: # using the named URL - reverse('news_archive') + reverse('news-archive') # passing a callable object # (This is discouraged because you can't reverse namespaced views this way.) diff --git a/docs/topics/class-based-views/generic-editing.txt b/docs/topics/class-based-views/generic-editing.txt index 7b3b5083cc..9a9c4b7052 100644 --- a/docs/topics/class-based-views/generic-editing.txt +++ b/docs/topics/class-based-views/generic-editing.txt @@ -153,9 +153,9 @@ Finally, we hook these new views into the URLconf: urlpatterns = [ # ... - url(r'author/add/$', AuthorCreate.as_view(), name='author_add'), - url(r'author/(?P[0-9]+)/$', AuthorUpdate.as_view(), name='author_update'), - url(r'author/(?P[0-9]+)/delete/$', AuthorDelete.as_view(), name='author_delete'), + url(r'author/add/$', AuthorCreate.as_view(), name='author-add'), + url(r'author/(?P[0-9]+)/$', AuthorUpdate.as_view(), name='author-update'), + url(r'author/(?P[0-9]+)/delete/$', AuthorDelete.as_view(), name='author-delete'), ] .. note:: diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 14d10aa001..9ee927b08a 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -1342,7 +1342,7 @@ prepend the current active language code to all url patterns defined within from sitemap.views import sitemap urlpatterns = [ - url(r'^sitemap\.xml$', sitemap, name='sitemap_xml'), + url(r'^sitemap\.xml$', sitemap, name='sitemap-xml'), ] news_patterns = ([ @@ -1364,7 +1364,7 @@ function. Example:: from django.utils.translation import activate >>> activate('en') - >>> reverse('sitemap_xml') + >>> reverse('sitemap-xml') '/sitemap.xml' >>> reverse('news:index') '/en/news/' @@ -1400,7 +1400,7 @@ URL patterns can also be marked translatable using the from sitemaps.views import sitemap urlpatterns = [ - url(r'^sitemap\.xml$', sitemap, name='sitemap_xml'), + url(r'^sitemap\.xml$', sitemap, name='sitemap-xml'), ] news_patterns = ([