summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAsif Saifuddin Auvi <auvipy@gmail.com>2017-02-25 12:48:20 +0600
committerTim Graham <timograham@gmail.com>2017-02-27 14:47:11 -0500
commit5f3a689f71dedced29b77763617244845aa8b99a (patch)
tree1ccf0136118c290fdf2a5a927a8a0c5bd197b9b3 /docs
parent6b00af50146335485d8414c42efec7d8dd5397fc (diff)
Imported django.http classes instead of django.http.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/i18n/translation.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index a05490ac8d..07f34e87d3 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -1829,12 +1829,12 @@ preference persist in future requests.
If you are not using sessions, the language will persist in a cookie, whose name
is configured in :setting:`LANGUAGE_COOKIE_NAME`. For example::
- from django.utils import translation
- from django import http
from django.conf import settings
+ from django.http import HttpResponse
+ from django.utils import translation
user_language = 'fr'
translation.activate(user_language)
- response = http.HttpResponse(...)
+ response = HttpResponse(...)
response.set_cookie(settings.LANGUAGE_COOKIE_NAME, user_language)
Using translations outside views and templates