Should be
<img src="{{=URL(r=request,c='static',f='my_pics',args=myrows.id)}}"/
>
you can do
{{import os}}
{{if os.path.exists(os.path.join(request.folder,'static/my_pics/%s' %
myrows.id)):}}
<img src="{{=URL(r=request,c='static',f='my_pics',args=myrows.id)}}"/
>
{{else:}}
No image
{{pass}}
On Aug 12, 4:15 am, max <[email protected]> wrote:
> I am using
> <img src="{{=URL(r=request,c='static/my_pics',f=myrows.id)}}"/>
> to dynamically load the pictures.
> Sometimes the pictures are not for some ids. Is there any way to chcke
> if the picture is available using the request?
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" 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
-~----------~----~----~----~------~----~------~--~---