Yes, I want get from database many images (maybe not all, but 100 or 50
pictures). In your case for creating 1 page I need to do 101 or 51 query to
database. I want have one query and transfer row.recipes.IMAGE as variable
in img function. Somthing like that (but it's not work):
def index():
image = ''
rows = db().select(db.recipes.IMAGE)
for row in rows:
image += '<img src="'+URL( 'default', 'img', args = [row.recipes.
IMAGE])+'" class="card-img-top" alt="..."/>'
image = XML(image)
return dict(image=image)
def img():
image = request.args(0)
if image:
return image.read()
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/bdc7d1ae-7dcb-4064-8a8c-32b1b35e9dea%40googlegroups.com.