summaryrefslogtreecommitdiffstats
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-08 18:41:59 +0100
committerDan McGee <dan@archlinux.org>2011-01-08 18:41:59 +0100
commit9a1971e24fe15ccdb74f3a8a59d735504f2797be (patch)
treeddfc98055d9bb2efde7456007040ef8533eb0f2f /main/models.py
parentbf3893768c42e7c0d4f4205819ef4e5ada1b2707 (diff)
downloadarchweb-9a1971e24fe15ccdb74f3a8a59d735504f2797be.tar.gz
archweb-9a1971e24fe15ccdb74f3a8a59d735504f2797be.tar.xz
Add time zone field to developer profile
This will be used by the developer world clock page soon to come. Default everyone to "UTC" for now. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/models.py b/main/models.py
index 8858b17..0e9e55a 100644
--- a/main/models.py
+++ b/main/models.py
@@ -2,18 +2,23 @@ from django.db import models
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
-from main.utils import cache_function
+from main.utils import cache_function, make_choice
from packages.models import PackageRelation
from itertools import groupby
+import pytz
from operator import attrgetter
class UserProfile(models.Model):
- id = models.AutoField(primary_key=True) # not technically needed
notify = models.BooleanField(
"Send notifications",
default=True,
help_text="When enabled, send user 'flag out-of-date' notifications")
+ time_zone = models.CharField(
+ max_length=100,
+ choices=make_choice(pytz.all_timezones),
+ default="UTC",
+ help_text="Used for developer clock page")
alias = models.CharField(
max_length=50,
help_text="Required field")