If you include any file input fields then the open tag will automatically supply an enctype="multipart/form-data" attribute.
>>> import albatross >>> from fakeapp import ctx >>> albatross.Template(ctx, '<magic>', ''' ... <al-form whitespace> ... <al-input type="text" name="name" whitespace> ... <al-input type="file" name="data" whitespace> ... </al-form whitespace> ... ''').to_html(ctx) >>> ctx.flush_content() <form action="/fakeapp.py" enctype="multipart/form-data"> <input type="text" name="name" /> <input type="file" name="data" /> <div><input type="hidden" name="__albform__" value="eJzjECjXXD/Z7bjIvorcXnm3j10Tnf83MNUWMmqEsqQkliQWMnkzh7LkJeamFjJ7M5TqAQC+UhCo " /></div> </form>