From 7fa0da1241bb6cf62e8443242c5d2329f549b7da Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 27 Feb 2017 03:59:02 +0300 Subject: [PATCH] refactoring --- abonapp/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/abonapp/models.py b/abonapp/models.py index cd4c7dd..f206ace 100644 --- a/abonapp/models.py +++ b/abonapp/models.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from datetime import datetime from django.utils import timezone from django.db import models from django.core import validators @@ -242,7 +243,7 @@ class Abon(UserProfile): def activate_next_tariff(self, author): ats = AbonTariff.objects.filter(abon=self).order_by('tariff_priority') - nw = timezone.make_aware(timezone.datetime.now()) + nw = timezone.make_aware(datetime.now()) for at in ats: # усдуга не активна, продолжаем