Changeset 4708
- Timestamp:
- 03/12/07 04:21:22 (2 years ago)
- Files:
-
- django/trunk/AUTHORS (modified) (1 diff)
- django/trunk/django/views/i18n.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/AUTHORS
r4691 r4708 86 86 favo@exoweb.net 87 87 Eric Floehr <eric@intellovations.com> 88 Jorge Gajon <gajon@gajon.org> 88 89 gandalf@owca.info 89 90 Baishampayan Ghose django/trunk/django/views/i18n.py
r4265 r4708 10 10 Redirect to a given url while setting the chosen language in the 11 11 session or cookie. The url and the language code need to be 12 specified in the GET param ters.12 specified in the GET parameters. 13 13 """ 14 lang_code = request.GET ['language']14 lang_code = request.GET.get('language', None) 15 15 next = request.GET.get('next', None) 16 16 if not next: … … 19 19 next = '/' 20 20 response = http.HttpResponseRedirect(next) 21 if check_for_language(lang_code):21 if lang_code and check_for_language(lang_code): 22 22 if hasattr(request, 'session'): 23 23 request.session['django_language'] = lang_code
