diff --git a/asuzr/views.py b/asuzr/views.py index d94fdaa..cb60329 100644 --- a/asuzr/views.py +++ b/asuzr/views.py @@ -257,11 +257,9 @@ def prod_plan_view(request): sdate = curr_date - timedelta(days = wd) edate = curr_date + timedelta(days = 6-wd) - days = [curr_date + timedelta(days=i) for i in range(-curr_date.weekday(), 7-curr_date.weekday())] - print days - - week_days = {i: {'date': custom_date(i.year,i.month,i.day)} for i in days} - + days = [sdate + timedelta(days=i) for i in range(0,7)] + week_days = {i.weekday(): {'date': custom_date(i.year,i.month,i.day)} for i in days} + print week_days prodplan_list = ProdPlan.objects.filter(start_date__range = (sdate,edate)) for prodplan in prodplan_list: