def sign_file(self, file_input, key=None, destination=None, key_id=None, passphrase=None, clearsign=False):

        kwargs = {}
        kwargs['clearsign'] = clearsign

        if key_id:
            kwargs['keyid'] = key_id

        if key:
            kwargs['keyid'] = key.key_id

        if passphrase:
            kwargs['passphrase'] = passphrase

        input_descriptor = GPG.get_descriptor(file_input)

        if destination:
            output_descriptor = open(destination, 'wb')

        signed_data = self.gpg.sign_file(input_descriptor, **kwargs)
        if not signed_data.fingerprint:
            raise GPGSigningError('Unable to sign file')

        if destination:
            output_descriptor.write(signed_data.data)

        input_descriptor.close()

        if destination:
            output_descriptor.close()

        if not destination:
            return signed_data
Create form for the `index_view` using only the columns from
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/django_gpg/api.py/GPG.sign_file--crossover with--dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/model/base.py/BaseModelView.scaffold_list_form