diff --git a/aleksis/apps/chronos/urls.py b/aleksis/apps/chronos/urls.py index 685eacb2d052cea72968bebd956be8a564532aab..477da6be4de647703ea9d2d2ef1ad13122043382 100644 --- a/aleksis/apps/chronos/urls.py +++ b/aleksis/apps/chronos/urls.py @@ -10,11 +10,7 @@ urlpatterns = [ views.my_timetable, name="my_timetable_by_date", ), - path( - "timetable/<str:type_>/<int:pk>/", - views.timetable, - name="timetable", - ), + path("timetable/<str:type_>/<int:pk>/", views.timetable, name="timetable",), path( "timetable/<str:type_>/<int:pk>/<int:year>/<int:week>/", views.timetable, @@ -27,9 +23,7 @@ urlpatterns = [ name="timetable_print", ), path( - "timetable/<str:type_>/<int:pk>/<str:regular>/", - views.timetable, - name="timetable_regular", + "timetable/<str:type_>/<int:pk>/<str:regular>/", views.timetable, name="timetable_regular", ), path("lessons/", views.lessons_day, name="lessons_day"), path( diff --git a/aleksis/apps/chronos/views.py b/aleksis/apps/chronos/views.py index 8a3a5a30b93309dae35e4cecd82b183a7d3da014..0791a2fe726292808b53f5b9591743939ff58a5d 100644 --- a/aleksis/apps/chronos/views.py +++ b/aleksis/apps/chronos/views.py @@ -1,16 +1,13 @@ from datetime import datetime, timedelta from typing import Optional -import subprocess -from tempfile import mkstemp from django.db.models import Count, Q -from django.http import HttpRequest, HttpResponse, HttpResponseNotFound, FileResponse +from django.http import HttpRequest, HttpResponse, HttpResponseNotFound from django.shortcuts import get_object_or_404, redirect, render from django.urls import reverse from django.utils import timezone from django.utils.translation import ugettext as _ from django.views.decorators.cache import never_cache -from django.template.loader import get_template, render_to_string from django_tables2 import RequestConfig from rules.contrib.views import permission_required @@ -28,7 +25,6 @@ from .util.build import build_substitutions_list, build_timetable, build_weekday from .util.chronos_helpers import get_el_by_pk, get_substitution_by_id from .util.date import CalendarWeek, get_weeks_for_year from .util.js import date_unix -from aleksis.core.settings import STATIC_ROOT @permission_required("chronos.view_timetable_overview")