Skip to content
Snippets Groups Projects
Commit 7e63a041 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge

parent 76e0dab6
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -16,4 +16,4 @@ dynselect2/src/*
dynselect2/bundle.js
package-lock.json
schoolapps/latex/
schoolapps/log.django
schoolapps/log.django
\ No newline at end of file
#!/usr/bin/env bash
cd schoolapps || exit
../env/bin/python manage.py refresh_caches > ../refresh_caches.log
\ No newline at end of file
......@@ -5,7 +5,7 @@ from django.utils import timezone
from dashboard.caches import BACKGROUND_CACHE_REFRESH
from dashboard.models import Cache
from helper import get_newest_article_from_news, get_current_events_with_cal
from utils.network import get_newest_article_from_news, get_current_events_with_cal
from timetable.views import get_next_weekday_with_time, get_calendar_week
from untisconnect.drive import build_drive, TYPE_TEACHER, TYPE_CLASS, TYPE_ROOM
from untisconnect.parse import parse
......
from django.test import TestCase
# Create your tests here.
......@@ -26,7 +26,7 @@ except (Terms.DoesNotExist, Schoolyear.DoesNotExist, ProgrammingError):
import dashboard.views.tools as tools_views
urlpatterns += [
path('offline', views.offline, name='offline'),
path('offline', tools_views.offline, name='offline'),
path("tools", tools_views.tools, name="tools"),
path("tools/clear-cache", tools_views.tools_clear_cache, name="tools_clear_cache"),
path("tools/clear-cache/<str:id>", tools_views.tools_clear_cache, name="tools_clear_single_cache"),
......
def offline(request):
return render(request, 'common/offline.html')
\ No newline at end of file
......@@ -6,6 +6,10 @@ from django.urls import reverse
from dashboard.models import Cache
def offline(request):
return render(request, 'common/offline.html')
@login_required
@user_passes_test(lambda u: u.is_superuser)
def tools(request):
......
......@@ -2,7 +2,6 @@ import datetime
import os
from typing import List
from PyPDF2 import PdfFileMerger
from django.contrib.auth.decorators import login_required, permission_required
from django.http import Http404, FileResponse
from django.shortcuts import render, redirect, get_object_or_404
......@@ -10,18 +9,13 @@ from django.utils import timezone
from django.views.decorators.cache import cache_page
from dashboard.caches import SUBS_VIEW_CACHE, MY_PLAN_VIEW_CACHE, PLAN_VIEW_CACHE
from debug.models import register_traceback, register_return_0
from schoolapps.settings import BASE_DIR
from schoolapps.settings import SHORT_WEEK_DAYS, LONG_WEEK_DAYS
from timetable.filters import HintFilter
from timetable.forms import HintForm
from timetable.hints import get_all_hints_by_time_period, get_all_hints_by_class_and_time_period, \
get_all_hints_for_teachers_by_time_period, get_all_hints_not_for_teachers_by_time_period
from timetable.pdf import generate_class_tex, generate_pdf
from timetable.pdf import generate_class_tex_header, generate_class_tex_body, generate_pdf
from untisconnect.plan import get_plan, TYPE_TEACHER, TYPE_CLASS, TYPE_ROOM, parse_lesson_times
from untisconnect.sub import get_substitutions_by_date, generate_sub_table, get_header_information, SubRow
from untisconnect.api import *
from untisconnect.datetimeutils import get_calendar_week, get_calendar_weeks, get_next_weekday, find_out_what_is_today, \
get_next_weekday_with_time
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment