Skip to content
Snippets Groups Projects
Verified Commit 62f62479 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Reinvent the whell because Django is a jerk.

parent b3150fec
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,10 @@ from django.utils.translation import ugettext_lazy as _
from biscuit.core.mixins import SchoolRelated
def isidentifier(value: str) -> bool:
return value.isidentifier()
class PersonalNote(SchoolRelated):
""" A personal note about a single person. Used in the class register to note
absences, excuses and remarks about a student in a single lesson period.
......@@ -48,7 +52,7 @@ class PersonalNoteFilter(SchoolRelated):
""" A filter definition that can generate statistics on personal note texts. """
identifier = models.CharField(verbose_name=_('Identifier'), max_length=30,
validators=[str.isidentifier])
validators=[isidentifier])
description = models.CharField(verbose_name=_('Description'), max_length=60, blank=True)
regex = models.CharField(verbose_name=_('Match expression'), max_length=100)
......
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