<commit_before>from django import forms
from django.contrib.auth.models import User

from apps.hygiene.models import CheckDay, CheckDayItem, CheckItem


class CheckDayForm(forms.ModelForm):
    date = forms.DateField(widget=forms.HiddenInput())
    checker = forms.ModelChoiceField(queryset=User.objects.all(), required=False)

    def __init__(self, *args, **kwargs):
        self.declared_fields['checker'].label_from_instance = lambda obj: obj.get_full_name()
        super(CheckDayForm, self).__init__(*args, **kwargs)<commit_msg>fixes #20: filter users for hygiene planning: must be active<commit_after>from django import forms
from django.contrib.auth.models import User

from apps.hygiene.models import CheckDay, CheckDayItem, CheckItem


class CheckDayForm(forms.ModelForm):
    date = forms.DateField(widget=forms.HiddenInput())
    checker = forms.ModelChoiceField(queryset=User.objects.filter(is_active=True), required=False)

    def __init__(self, *args, **kwargs):
        self.declared_fields['checker'].label_from_instance = lambda obj: obj.get_full_name()
        super(CheckDayForm, self).__init__(*args, **kwargs)
{'fraction_non_alphanumeric': 0.11307420494699646, 'fraction_numerical': 0.0017667844522968198, 'mean_word_length': 5.587209302325581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1031686', 'n_tokens_mistral': 341, 'n_tokens_neox': 330, 'n_words': 72}