old_contents: from django import forms
  from django.contrib.auth.forms import AuthenticationForm, SetPasswordForm
  from django.forms.formsets import DELETION_FIELD_NAME
  from django.utils.translation import ugettext
  from django.utils.translation import ugettext_lazy as _
  from tapeforms.contrib.bootstrap import BootstrapTapeformMixin
  
  
  class CruditorTapeformMixin(BootstrapTapeformMixin):
      pass
  
  
  class CruditorFormsetMixin(object):
      js_formset_options = None
  
      def add_fields(self, form, index):
          super().add_fields(form, index)
  
          if DELETION_FIELD_NAME in form.fields:
              form.fields[DELETION_FIELD_NAME].widget = forms.HiddenInput()
  
      def get_js_formset_options(self):
          options = {
              'prefix': self.prefix,
              'add-button-label': ugettext('Add another'),
              'add-title': ugettext('New item'),
              'delete-button-label': ugettext('Delete item'),
              'delete-confirm-text': ugettext(
                  'Are you sure? Item will be deleted after saving.')
          }
          options.update(self.js_formset_options or {})
          return options
  
  
  class CruditorFormsetFormMixin(CruditorTapeformMixin):
  
      def visible_fields(self):
          return [field for field in super().visible_fields() if field.name != 'DELETE']
  
  
  class LoginForm(CruditorTapeformMixin, AuthenticationForm):
      pass
  
  
  class ChangePasswordForm(CruditorTapeformMixin, SetPasswordForm):
      pass
  
  
  class DeleteConfirmForm(CruditorTapeformMixin, forms.Form):
      confirm = forms.BooleanField(
          label=_('Are you sure you want to delete this item?'), required=True)
  
new_contents: from django import forms
  from django.contrib.auth.forms import AuthenticationForm, SetPasswordForm
  from django.forms.formsets import DELETION_FIELD_NAME
  from django.utils.translation import ugettext
  from django.utils.translation import ugettext_lazy as _
  from tapeforms.contrib.bootstrap import BootstrapTapeformMixin
  
  
  class CruditorTapeformMixin(BootstrapTapeformMixin):
      pass
  
  
  class CruditorFormsetMixin(object):
      """
      Helper mixin to provide some additional configuration to the javascript part
      of Cruditor's formset support, mainly translations but also all other stuff
      which might be needed.
      """
      js_formset_options = None
  
      def add_fields(self, form, index):
          """
          Overwritten method to make sure the DELETE marker field is hidden in output.
          """
          super().add_fields(form, index)
  
          if DELETION_FIELD_NAME in form.fields:
              form.fields[DELETION_FIELD_NAME].widget = forms.HiddenInput()
  
      def get_js_formset_options(self):
          """
          This method builds the options dict for the javascript part. Some defaults
          are merged with `js_formset_options` property.
          """
          options = {
              'prefix': self.prefix,
              'add-button-label': ugettext('Add another'),
              'add-title': ugettext('New item'),
              'delete-button-label': ugettext('Delete item'),
              'delete-confirm-text': ugettext(
                  'Are you sure? Item will be deleted after saving.')
          }
          options.update(self.js_formset_options or {})
          return options
  
  
  class CruditorFormsetFormMixin(CruditorTapeformMixin):
      """
      Helper mixin for forms in a formset
      """
  
      def visible_fields(self):
          """
          This method is overwritten to  make sure that the DELETE marker field
          is not considered when returning the list of visible fields.
          """
          return [
              field for field in super().visible_fields()
              if field.name != DELETION_FIELD_NAME
          ]
  
  
  class LoginForm(CruditorTapeformMixin, AuthenticationForm):
      pass
  
  
  class ChangePasswordForm(CruditorTapeformMixin, SetPasswordForm):
      pass
  
  
  class DeleteConfirmForm(CruditorTapeformMixin, forms.Form):
      confirm = forms.BooleanField(
          label=_('Are you sure you want to delete this item?'), required=True)
  
subject: Add some docstrings.