Ejemplo n.º 1
0
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'))
Ejemplo n.º 2
0
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'))
Ejemplo n.º 3
0
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())