import datetime #for checking renewal date range.

from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _

from .models import (Patient, AdmissionNote, FluVaccine,
    CollectionType, CollectedSample,
    Symptom, ObservedSymptom,
)


class AdmissionNoteForm(forms.ModelForm):
    class Meta:
        model = AdmissionNote
        fields = [
            'id_gal_origin',
        ]


class PatientForm(forms.ModelForm):
    class Meta:
        model = Patient
        fields = [
            'name',
        ]


class FluVaccineForm(forms.ModelForm):
    class Meta:
        model = FluVaccine
        fields = [
            'was_applied',
        ]

import datetime #for checking renewal date range.

from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _

from .models import (Patient, AdmissionNote, FluVaccine,
    CollectionType, CollectedSample,
    Symptom, ObservedSymptom,
)


class AdmissionNoteForm(forms.ModelForm):
    class Meta:
        model = AdmissionNote
        fields = [
            'id_gal_origin',
        ]


class PatientForm(forms.ModelForm):
    class Meta:
        model = Patient
        fields = [
            'name',
        ]


class FluVaccineForm(forms.ModelForm):
    class Meta:
        model = FluVaccine
        fields = [
            'was_applied',
        ]
        widgets = {
            'was_applied': forms.RadioSelect(
                choices=(
                    (True, "Sim"), (False, "Não"), (None, "Ignorado"),
                ),
            ),
        }

Change Vaccine was_applied widget to RadioSelect
:rocket: Change Vaccine was_applied widget to RadioSelect

  import datetime #for checking renewal date range.
  
  from django import forms
  from django.core.exceptions import ValidationError
  from django.utils.translation import ugettext_lazy as _
  
  from .models import (Patient, AdmissionNote, FluVaccine,
      CollectionType, CollectedSample,
      Symptom, ObservedSymptom,
  )
  
  
  class AdmissionNoteForm(forms.ModelForm):
      class Meta:
          model = AdmissionNote
          fields = [
              'id_gal_origin',
          ]
  
  
  class PatientForm(forms.ModelForm):
      class Meta:
          model = Patient
          fields = [
              'name',
          ]
  
  
  class FluVaccineForm(forms.ModelForm):
      class Meta:
          model = FluVaccine
          fields = [
              'was_applied',
          ]
+         widgets = {
+             'was_applied': forms.RadioSelect(
+                 choices=(
+                     (True, "Sim"), (False, "Não"), (None, "Ignorado"),
+                 ),
+             ),
+         }
  
Change Vaccine was_applied widget to RadioSelect
## Code Before:
import datetime #for checking renewal date range.

from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _

from .models import (Patient, AdmissionNote, FluVaccine,
    CollectionType, CollectedSample,
    Symptom, ObservedSymptom,
)


class AdmissionNoteForm(forms.ModelForm):
    class Meta:
        model = AdmissionNote
        fields = [
            'id_gal_origin',
        ]


class PatientForm(forms.ModelForm):
    class Meta:
        model = Patient
        fields = [
            'name',
        ]


class FluVaccineForm(forms.ModelForm):
    class Meta:
        model = FluVaccine
        fields = [
            'was_applied',
        ]

## Instruction:
Change Vaccine was_applied widget to RadioSelect
## Code After:
import datetime #for checking renewal date range.

from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _

from .models import (Patient, AdmissionNote, FluVaccine,
    CollectionType, CollectedSample,
    Symptom, ObservedSymptom,
)


class AdmissionNoteForm(forms.ModelForm):
    class Meta:
        model = AdmissionNote
        fields = [
            'id_gal_origin',
        ]


class PatientForm(forms.ModelForm):
    class Meta:
        model = Patient
        fields = [
            'name',
        ]


class FluVaccineForm(forms.ModelForm):
    class Meta:
        model = FluVaccine
        fields = [
            'was_applied',
        ]
        widgets = {
            'was_applied': forms.RadioSelect(
                choices=(
                    (True, "Sim"), (False, "Não"), (None, "Ignorado"),
                ),
            ),
        }
