@ -85,7 +85,10 @@ class UserView(DetailView):
context['subscription_ends'] = school_payment.last().date_end
context['school_schedules'] = SchoolSchedule.objects.filter(
weekday__in=school_schedules_purchased if school_payment.exists() else [],
)
).annotate(
calk=F('weekday') - now().isoweekday(),
weight=(7 + F('calk') % 7) % 7,
).order_by('weight')
return context