<commit_before>from django.forms import ModelForm, HiddenInput

from cellcounter.main.models import CellCount, CellCountInstance, BoneMarrowBackground, ErythropoiesisFindings, GranulopoiesisFindings, MegakaryocyteFeatures

class CellCountInstanceForm(ModelForm):
    class Meta:
        model = CellCountInstance
        exclude = ('datetime_created', 'datetime_updated', 'user')

class BoneMarrowBackgroundForm(ModelForm):
    class Meta:
        model = BoneMarrowBackground
        exclude = ('cell_count_instance',) 

class ErythropoiesisFindingsForm(ModelForm):
    class Meta:
        model = ErythropoiesisFindings
        exclude = ('cell_count_instance',) 

class GranulopoiesisFindingsForm(ModelForm):
    class Meta:
        model = GranulopoiesisFindings
        exclude = ('cell_count_instance',) 

class MegakaryocyteFeaturesForm(ModelForm):
    class Meta:
        model = MegakaryocyteFeatures
        exclude = ('cell_count_instance',) 

class CellCountForm(ModelForm):
    class Meta:
        model = CellCount
        widgets = {
                'cell': HiddenInput(),
                'normal_count': HiddenInput,
                'abnormal_count': HiddenInput}
        exclude = ('cell_count_instance', 'comment',)

class CellCountEditForm(ModelForm):
    class Meta:
        model = CellCount
        fields = ('normal_count', 'abnormal_count', 'comment')
<commit_msg>Added form for IronStain<commit_after>from django.forms import ModelForm, HiddenInput

from cellcounter.main.models import CellCount, CellCountInstance, BoneMarrowBackground, ErythropoiesisFindings, GranulopoiesisFindings, MegakaryocyteFeatures

class CellCountInstanceForm(ModelForm):
    class Meta:
        model = CellCountInstance
        exclude = ('datetime_created', 'datetime_updated', 'user')

class BoneMarrowBackgroundForm(ModelForm):
    class Meta:
        model = BoneMarrowBackground
        exclude = ('cell_count_instance',) 

class ErythropoiesisFindingsForm(ModelForm):
    class Meta:
        model = ErythropoiesisFindings
        exclude = ('cell_count_instance',) 

class GranulopoiesisFindingsForm(ModelForm):
    class Meta:
        model = GranulopoiesisFindings
        exclude = ('cell_count_instance',) 

class MegakaryocyteFeaturesForm(ModelForm):
    class Meta:
        model = MegakaryocyteFeatures
        exclude = ('cell_count_instance',) 

class CellCountForm(ModelForm):
    class Meta:
        model = CellCount
        widgets = {
                'cell': HiddenInput(),
                'normal_count': HiddenInput,
                'abnormal_count': HiddenInput}
        exclude = ('cell_count_instance', 'comment',)

class CellCountEditForm(ModelForm):
    class Meta:
        model = CellCount
        fields = ('normal_count', 'abnormal_count', 'comment')

class IronStainForm(ModelForm):
    class Meta:
        model = IronStain
        exclude = ('cell_count_instance',) 

{'fraction_non_alphanumeric': 0.08499655884377151, 'fraction_numerical': 0.0, 'mean_word_length': 3.444954128440367, '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': '4893770', 'n_tokens_mistral': 844, 'n_tokens_neox': 800, 'n_words': 175}