I have a model that has:
db.Field('screenshot', 'upload'))
In my controller i have:
def add():
form = SQLFORM(db.apps)
if form.accepts(request.vars, session):
redirect(URL(r=request, c='default', f='index'))
return dict(form = form)
and in my view I have:
{{for app in records:}}
<div>
<img src="{{=URL(r=request, c='uploads',
f=app.screenshot)}}">
{{=A(app.name, _href=URL(r=request,
f=app.link))}}
<span>by {{=app.author}}</span>
<br/>
<span>{{=app.description}}</span>
</div>
{{pass}}
this returns a broken image. anyone know how to display an image from
the upload of a form?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---