old_contents: from django.forms.widgets import CheckboxInput
  
  
  class LFSCheckboxInput(CheckboxInput):
      def value_from_datadict(self, data, files, name):
          res = super(LFSCheckboxInput, self).value_from_datadict(data, files, name)
          return int(res)
new_contents: from django.utils import six
  from django.forms.widgets import CheckboxInput
  
  
  class LFSCheckboxInput(CheckboxInput):
      def value_from_datadict(self, data, files, name):
          if name not in data:
              # A missing value means False because HTML form submission does not
              # send results for unselected checkboxes.
              return False
          value = data.get(name)
          # Translate true and false strings to boolean values.
          values = {'true': True, 'false': False}
          if isinstance(value, six.string_types):
              value = values.get(value.lower(), value)
          return value
subject: fix value returned by checkbox input