diff --git a/boards/forms.py b/boards/forms.py --- a/boards/forms.py +++ b/boards/forms.py @@ -1,5 +1,6 @@ import re import time +import pytz from django import forms from django.core.files.uploadedfile import SimpleUploadedFile @@ -47,6 +48,13 @@ HTTP_RESULT_OK = 200 TEXTAREA_ROWS = 4 +def get_timezones(): + timezones = [] + for tz in pytz.common_timezones: + timezones.append((tz, tz),) + return timezones + + class FormatPanel(forms.Textarea): """ Panel for text formatting. Consists of buttons to add different tags to the @@ -321,9 +329,9 @@ class ThreadForm(PostForm): class SettingsForm(NeboardForm): - theme = forms.ChoiceField(choices=settings.THEMES, - label=_('Theme')) + theme = forms.ChoiceField(choices=settings.THEMES, label=_('Theme')) username = forms.CharField(label=_('User name'), required=False) + timezone = forms.ChoiceField(choices=get_timezones(), label=_('Time zone')) def clean_username(self): username = self.cleaned_data['username'] diff --git a/boards/locale/ru/LC_MESSAGES/django.mo b/boards/locale/ru/LC_MESSAGES/django.mo index 34c16f9e0e0a9b30a8f68a6aba9d15d6f0d53db3..276c48cea3ffc8b9eb795283871a1d8b0fb7e6e6 GIT binary patch literal 6810 zc$|$_Yiu0V6~3X+#%tp|?1Y$7xB-$9!Y;c>fUt=}oY+YWe&Gic`okUXPV5Q0Gt11Z z6Sqh>aYLX^F$$p4P@0-lR8>J3W5>@pt z|BJ8U@_AqiSOGi%i~xPT{~|6MfaidlfZqk)4Ezwd7C5EtT?K9f{!;J%16T$8m&P?~ z`TXj&d`>M;0`CNF1wIC>0~%}D-ZwO!1KtXJ9as$<2Yv}Sq3!$zxDNP-we0t&TJE2~ zF9UC?U_19$u>8XnZ0}$N``K2(@ptLxXDirFZw1GHLd&}q?EkP{e@Q>TTEXYPq4j>K z?R=>1PE~N87Jx~rPX*WMf7;F+P}&H*H^TCd06zyj5aBouMcCex!2Q6d^z-Y$?ZCGp z9N)DF`|~T{7GMZ`4EWaw$9;b#@9(MPyd;4Kfqg(wMqIAs^WUpv`451117|APzfUUp z{J&Rn9QRkTyjjKZWvW;&uh(A$)>59TIL^1V+~q2^_dakl`3;;|BgF534^uv?`P^Sr zb6!8KX8!!An&Y|!i+2%k)-hiWtYbT0S;u