it there a way to elaborate on this a bit more... i have a similar structure...and i am able to do a multiupload.. and create new albums. however i am looking to allow users to upload images to the same album or any pre-existing album
On Friday, 22 October 2010 09:51:00 UTC+5:30, Alex wrote: > > It's because since your images have a reference now to your albums - > that means an album can have many images. So for every record in your > album table, it gets a new attribute for the image. > > Take a look in the book at section 6.20. It explains it there. > > On Oct 21, 9:40 pm, iu_long <ivelin.sla...@gmail.com> wrote: > > I am a bit puzzled here. > > > > Lets say I have a table called Album and a table called Images. Images > > has a field from_album, which points to Album.id. I have a controller > > which returns all the entries in Album. > > I return db(db.Album.id>0).select(). When I return it like this, there > > is nothing special, but if : > > > > albums = db(db.Album.id>0).select() > > alblist = [] > > for row in albums: > > alblist.append(row) > > > > return dict(album=alblist) > > > > I can reference Images like: > > album.Images.id > > > > How come ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.