def template_upload_form(p, short_code): with p(html.form({u'enctype':u'multipart/form-data',u'action':upload.url()})): p(u'Please upload a properly formatted CSV') p(html.br()) p(html.input_text(u'short_code', short_code)) p(html.input_file(name=u'csv')) p(html.input_submit(value=u'Upload'))
def hello_template(p, name): with p(html.form(action=u'', method='GET')): p(u'Hello, %s! <br />' % name) p(u'Your name: %s' % html.input_text('name')) p(html.input_submit('name'))
def partial_search_box(t, ticker): with t(html.div()): with t(html.form(attrs={'action':index.url()})): t(html.input_text('ticker', ticker)) t(html.input_submit())