Skip to content

Commit

Permalink
Remove datetime imports unused by Django 1.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
treyhunner committed Apr 10, 2013
1 parent 57826e2 commit e92ab27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions model_utils/fields.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
from __future__ import unicode_literals
from datetime import datetime

from django.db import models
from django.conf import settings
from django.utils.encoding import python_2_unicode_compatible


try:
from django.utils.timezone import now as now
except ImportError:
now = datetime.now
from django.utils.timezone import now as now


class AutoCreatedField(models.DateTimeField):
Expand Down
8 changes: 1 addition & 7 deletions model_utils/models.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
from __future__ import unicode_literals
from datetime import datetime

from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.db.models.fields import FieldDoesNotExist
from django.core.exceptions import ImproperlyConfigured
from django.utils.timezone import now as now

from model_utils.managers import QueryManager
from model_utils.fields import AutoCreatedField, AutoLastModifiedField, \
StatusField, MonitorField

try:
from django.utils.timezone import now as now
except ImportError:
now = datetime.now



class TimeStampedModel(models.Model):
"""
Expand Down

0 comments on commit e92ab27

Please sign in to comment.