diff options
-rw-r--r-- | views.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -13,6 +13,8 @@ # You should have received a copy of the GNU Affero General Public License # along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>. +import datetime + from django.conf import settings from django.db.models import Max from django.http import Http404 @@ -34,7 +36,8 @@ def mention_list(request, year_slug): def group_list_common(request, timetable, groups): year, week = get_current_week() start, _ = get_week(year, week) - groups_weeks = Course.objects.get_weeks(begin__gte=start, timetable=timetable) \ + end = start + datetime.timedelta(weeks=4) + groups_weeks = Course.objects.get_weeks(begin__gte=start, begin__lt=end, timetable=timetable) \ .values("groups__mention", "groups__subgroup", "groups__td", "groups__tp", "year", "week") |