I have the following form :
form action=/auction/create/ method=postplabel
for=auction_createdCreated/labelbr //p
plabel for=auction_userUser/labelbr /input id=auction_user
name=auction[user] size=30 type=text value= //p
plabel for=auction_auction_titleAuction title/labelbr /input
id=auction_auction_title name=auction[auction_title] size=30
type=text value= //p
plabel for=auction_auction_urlAuction url/labelbr /input
id=auction_auction_url name=auction[auction_url] size=30 type=text
value= //p
plabel for=auction_modification_recModification rec/labelbr
/input id=auction_modification_rec name=auction[modification_rec]
size=30 type=text value= //p
plabel for=auction_stateState/labelbr /input id=auction_state
name=auction[state] size=30 type=text value= //pinput
name=commit type=submit value=Create //form
I post the form data with the following calls:
params = urllib.urlencode({auction[user] :user,
auction[auction_title]: auction_title,auction[auction_url]: auction_url,
auction[modification_rec] :recommendation, auction[state]=:
state,commit:Create})
print Storing
data = urllib.urlopen(self.baseUrl,params)
When I go and view the inserted record, the record exists, but the field
values are null. It is my thinking that the backend needs the id value
for each input value; how do I add that data to the urlencode() call?
When I utilize the above form, all is inserted and all of the field values
appear. What data am I not accounting for with my program; for its obvious
that the browser is sending something to the server that my application is
not.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list