summaryrefslogtreecommitdiffstats
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-24 09:19:48 -0500
committerDan McGee <dan@archlinux.org>2012-07-24 19:57:20 -0500
commitc0bf9e20660cfae7ea8994472555bba23398b598 (patch)
tree889351fc02d4930233acf3dace3ececda4833c88 /main/models.py
parent61b4098c611592d62b40a9ee941976a869dff4fc (diff)
downloadarchweb-c0bf9e20660cfae7ea8994472555bba23398b598.tar.gz
archweb-c0bf9e20660cfae7ea8994472555bba23398b598.zip
Remove custom utc_now() function, use django.utils.timezone.now()
This was around from the time when we handled timezones sanely and Django did not; now that we are on 1.4 we no longer need our own code to handle this. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/models.py b/main/models.py
index 04d8da8f..6c9dfe4d 100644
--- a/main/models.py
+++ b/main/models.py
@@ -6,9 +6,10 @@ from pgpdump import BinaryData
from django.db import models
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
+from django.utils.timezone import now
from .fields import PositiveBigIntegerField
-from .utils import cache_function, set_created_field, utc_now
+from .utils import cache_function, set_created_field
class TodolistManager(models.Manager):
@@ -385,7 +386,7 @@ class TodolistPkg(models.Model):
def set_todolist_fields(sender, **kwargs):
todolist = kwargs['instance']
if not todolist.date_added:
- todolist.date_added = utc_now()
+ todolist.date_added = now()
# connect signals needed to keep cache in line with reality
from main.utils import refresh_latest