diff --git a/project/customer/context_processors.py b/project/customer/context_processors.py index 7b6c751..2eec3cf 100644 --- a/project/customer/context_processors.py +++ b/project/customer/context_processors.py @@ -10,13 +10,11 @@ def license_check_soon_ends(request): license_15days = cache.get('license_15_%s' % (request.user.username,), None) days_left = cache.get('days_left_%s' % (request.user.username,), None) cur_license = cache.get('cur_license_%s' % (request.user.username,), None) - print cur_license if not days_left or not cur_license: now = datetime.today() cur_license = License.objects.filter(company=request.user.profile, date_from__lte=now, date_to__gte=now, status__in=[-1, 1, 2], deleted=False) if cur_license: cur_license = cur_license[0] - print cur_license days_left = (cur_license.date_to - now.date()).days cache.set('days_left_%s' % (request.user.username,), days_left, 3600) cache.set('cur_license_%s' % (request.user.username,), cur_license, 3600)