mirror of
https://github.com/django/django.git
synced 2025-09-26 20:19:16 +00:00
Fixed a typo in an example in the timezone docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
be1082b3fe
commit
a9187e5447
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,7 @@ Create a view that can set the current timezone::
|
||||||
|
|
||||||
def set_timezone(request):
|
def set_timezone(request):
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
request.session[session_key] = pytz.timezone(request.POST['timezone'])
|
request.session['django_timezone'] = pytz.timezone(request.POST['timezone'])
|
||||||
return redirect('/')
|
return redirect('/')
|
||||||
else:
|
else:
|
||||||
return render(request, 'template.html', {'timezones': pytz.common_timezones})
|
return render(request, 'template.html', {'timezones': pytz.common_timezones})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue