form.py requires tuple

Bug #314970 reported by Aaron Swartz on 2009-01-08
2
Affects Status Importance Assigned to Milestone
web.py
Medium
Anand Chitipothu

Bug Description

This form renders incorrectly

import web, simplejson
config = web.storage(simplejson.load(file('config.json', 'r')))
post_form = form.Form(
   form.Textbox("subject", description="Title:"),
   form.Dropdown("category", config.categories,
description="Category:"),
   form.Textarea("entry", rows="20", cols="75" , description="Text:")
)

because form.Dropdown needs each argument to be the 'tuple' type:

   if type(arg) == tuple:

Perhaps it should use web.iters instead?

Aaron Swartz (aaronsw) on 2009-01-08
Changed in webpy:
assignee: nobody → anandology
importance: Undecided → Medium
milestone: none → 0.32
status: New → Confirmed
Anand Chitipothu (anandology) wrote :

fixed.

Changed in webpy:
status: Confirmed → Fix Committed
Changed in webpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers