form.py requires tuple

Bug #314970 reported by Aaron Swartz
2
Affects Status Importance Assigned to Milestone
web.py
Fix Released
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)
Changed in webpy:
assignee: nobody → anandology
importance: Undecided → Medium
milestone: none → 0.32
status: New → Confirmed
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.