From 5f3a689f71dedced29b77763617244845aa8b99a Mon Sep 17 00:00:00 2001 From: Asif Saifuddin Auvi Date: Sat, 25 Feb 2017 12:48:20 +0600 Subject: Imported django.http classes instead of django.http. --- docs/topics/i18n/translation.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') 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 -- cgit v1.3