From 6e69e789a1abe8c8272c3d4549675c394f5be0ff Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 3 Apr 2017 18:13:28 +0200 Subject: [PATCH] unnecessary code removed --- smash/web/views/appointment.py | 2 -- smash/web/views/notifications.py | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/smash/web/views/appointment.py b/smash/web/views/appointment.py index 71ec5824..8bc59f0c 100644 --- a/smash/web/views/appointment.py +++ b/smash/web/views/appointment.py @@ -1,8 +1,6 @@ # coding=utf-8 from django.shortcuts import get_object_or_404, redirect -from notifications import get_today_midnight_date, get_filter_locations, get_calendar_full_appointments, \ - get_unfinished_appointments from . import wrap_response from ..forms import AppointmentDetailForm, AppointmentAddForm, AppointmentEditForm, SubjectEditForm from ..models import Appointment diff --git a/smash/web/views/notifications.py b/smash/web/views/notifications.py index 0c57e769..31f749d8 100644 --- a/smash/web/views/notifications.py +++ b/smash/web/views/notifications.py @@ -241,12 +241,4 @@ def get_filter_locations(user): def get_today_midnight_date(): today = datetime.datetime.now() today_midnight = datetime.datetime(today.year, today.month, today.day) - return today_midnight - - -def get_calendar_full_appointments(user): - month_ago = get_today_midnight_date() + datetime.timedelta(days=-31) - return Appointment.objects.filter( - datetime_when__gt=month_ago, - location__in=get_filter_locations(user), - ).order_by('datetime_when') + return today_midnight \ No newline at end of file -- GitLab