diff --git a/odevzdavatko/templates/odevzdavatko/tabulka.html b/odevzdavatko/templates/odevzdavatko/tabulka.html index 7ee90ea9..cfbe0e6f 100644 --- a/odevzdavatko/templates/odevzdavatko/tabulka.html +++ b/odevzdavatko/templates/odevzdavatko/tabulka.html @@ -1,6 +1,5 @@ {% extends "base.html" %} -{% load utils %} {# Možná by mohlo být někde výš v hierarchii templatů... #} {% load barvy_reseni %} {% block content %} diff --git a/seminar/templatetags/utils.py b/seminar/templatetags/utils.py deleted file mode 100644 index ca400050..00000000 --- a/seminar/templatetags/utils.py +++ /dev/null @@ -1,19 +0,0 @@ -from django import template -from django.utils.safestring import mark_safe -from datetime import datetime, timedelta -from mamweb.settings import TIME_ZONE -import logging -register = template.Library() - -logger = logging.getLogger(__name__) - -@register.filter(name='kratke_datum', expects_localtime=True) -def kratke_datum(dt): - # None dává None, ne-datum dává False, aby se daly použít filtry typu "default". - if dt is None: - return None - if not isinstance(dt, datetime): - logger.warning(f"Špatné volání filtru {__name__}: {dt}") - return False - out = f'' - return mark_safe(out) diff --git a/seminar/templatetags/__init__.py b/tvorba/templatetags/__init__.py similarity index 100% rename from seminar/templatetags/__init__.py rename to tvorba/templatetags/__init__.py diff --git a/seminar/templatetags/deadliny.py b/tvorba/templatetags/deadliny.py similarity index 100% rename from seminar/templatetags/deadliny.py rename to tvorba/templatetags/deadliny.py diff --git a/seminar/templatetags/tex.py b/various/templatetags/tex.py similarity index 100% rename from seminar/templatetags/tex.py rename to various/templatetags/tex.py