summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--yaksh/forms.py3
-rw-r--r--yaksh/models.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index bf77d5a..38db811 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,7 @@ env:
install:
- pip install git+https://github.com/FOSSEE/online_test.git#egg=yaksh-0.1
- pip install -q Django==$DJANGO --use-mirrors
- - pip install -q pytz
+ - pip install -q pytz==2016.4
before_install:
- sudo apt-get update -qq
diff --git a/yaksh/forms.py b/yaksh/forms.py
index 34b87d4..26e0967 100644
--- a/yaksh/forms.py
+++ b/yaksh/forms.py
@@ -74,7 +74,8 @@ class UserRegisterForm(forms.Form):
(max_length=64, help_text='Department you work/study at')
position = forms.CharField\
(max_length=64, help_text='Student/Faculty/Researcher/Industry/etc.')
- timezone = forms.ChoiceField(choices=[(tz, tz) for tz in pytz.common_timezones])
+ timezone = forms.ChoiceField(choices=[(tz, tz) for tz in pytz.common_timezones],
+ initial=pytz.utc)
def clean_username(self):
u_name = self.cleaned_data["username"]
diff --git a/yaksh/models.py b/yaksh/models.py
index 23fd1c9..dbe7892 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -148,6 +148,8 @@ class Profile(models.Model):
institute = models.CharField(max_length=128)
department = models.CharField(max_length=64)
position = models.CharField(max_length=64)
+ timezone = models.CharField(max_length=64,
+ choices=[(tz, tz) for tz in pytz.common_timezones])
###############################################################################