>
> i've been trying to work this out but so far no image is showing, below is
> my mvc:
>
Model:
db.define_table('images',
Field('picture', 'upload',
uploadfolder=request.folder+'static/uploaded'))
Controller:
def index():
res = db(db.images).select()
#res = db(db.images.id==request.args(0)).select(db.images.picture)
return locals()
View:
{{for row in res:}}
<a class="thumbnail" href="#">
<img src="{{URL('static','uploaded',row.picture) }}" />
</a>
{{pass}}
i can get the image to show when i do this - <img
src="../static/uploaded/{{=row.picture}}" /> but not the above, is using
the URL helper is better?
--
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].
For more options, visit https://groups.google.com/d/optout.