diff options
author | Dan McGee <dan@archlinux.org> | 2012-07-24 09:19:48 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-07-24 19:57:20 -0500 |
commit | c0bf9e20660cfae7ea8994472555bba23398b598 (patch) | |
tree | 889351fc02d4930233acf3dace3ececda4833c88 /devel/models.py | |
parent | 61b4098c611592d62b40a9ee941976a869dff4fc (diff) |
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 'devel/models.py')
-rw-r--r-- | devel/models.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/devel/models.py b/devel/models.py index fd5df00a..9b6f07a7 100644 --- a/devel/models.py +++ b/devel/models.py @@ -4,10 +4,11 @@ import pytz from django.db import models from django.db.models.signals import pre_save from django.contrib.auth.models import User +from django.utils.timezone import now from django_countries import CountryField from .fields import PGPKeyField -from main.utils import make_choice, utc_now +from main.utils import make_choice class UserProfile(models.Model): @@ -105,7 +106,7 @@ def set_last_modified(sender, **kwargs): signal handler.''' obj = kwargs['instance'] if hasattr(obj, 'last_modified'): - obj.last_modified = utc_now() + obj.last_modified = now() # connect signals needed to keep cache in line with reality |