def file(self, name, value=None, id=NotGiven, **attrs): """ Return a ``file`` input tag. """ name = self._get_name(name) return tags.file(name, self.value(name, value), self._get_id(id, name), **attrs)
def file(self, name, value=None, id=None, **attrs): """ Outputs file input. """ id = id or name attrs.update(self.validation_attrs(name)) return tags.file(name, self.value(name, value), id, **attrs)
def file(self, name, value=None, id=None, **attrs): """ Outputs file input. """ return tags.file( name, self.value(name, value), self._get_id(id, name), **attrs )
def file_field(name, value=None, **options): """ Creates a file upload field. If you are using file uploads then you will also need to set the multipart option for the form. Example:: >>> print(file_field('myfile')) <input id="myfile" name="myfile" type="file" /> """ _update_fa(options, name) return tags.file(name, value=value, type="file", **options)