diff --git a/django/conf/urls/i18n.py b/django/conf/urls/i18n.py index 6e56af8271..426c2b2d30 100644 --- a/django/conf/urls/i18n.py +++ b/django/conf/urls/i18n.py @@ -1,5 +1,5 @@ from django.conf import settings -from django.conf.urls import patterns +from django.conf.urls import patterns, url from django.core.urlresolvers import LocaleRegexURLResolver def i18n_patterns(prefix, *args): @@ -16,5 +16,5 @@ def i18n_patterns(prefix, *args): urlpatterns = patterns('', - (r'^setlang/$', 'django.views.i18n.set_language'), + url(r'^setlang/$', 'django.views.i18n.set_language', name='set_language'), ) diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 988948e259..bdbb04823d 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -1272,7 +1272,7 @@ Here's example HTML template code: .. code-block:: html+django -
+ {% csrf_token %}