A graph consists of a set of vertices and a set of links. I think you should have a table for vertices and a able for links. Something like this:
db.define_table('vertex',SQLField('metadata')) db.define_table('link',SQLField('source',db.vertex),SQLField ('dest',db.vertex),SQLField('metadata')) db.link.source=IS_IN_DB(db,'db.vertex.id') db.link.dest=IS_IN_DB(db,'db.vertex.id') from gluon.tools import Crud crud=Crud(globals(),db) def build(): form1=crud.create(db.vertex,next=URL(r=request)) form2=crud.create(db.link,next=URL(r=request)) vertices=db(db.vertex.id>0).select() links=db(db.link.id>0).select() return dict (form1=form1,form2=form2,vertices=vertces,links=links) Massimo On May 6, 4:03 am, opedge <ope...@gmail.com> wrote: > My problem consists in work with graphs. I use a table of text input > fields to set the values of the paths in graph. > > On May 6, 3:41 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > Why do you have multiple fields with the same names? In general this > > should only be done for checkboxes. Is that the case? > > > Massimo > > > On May 5, 3:40 pm, opedge <ope...@gmail.com> wrote: > > > > I have multiple input fields with the same name. After submitting form > > > I have my input fields filled with values like ['','','','']. Can > > > web2py keep values for multiple input fields? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---