Hello,
I have a site, which uses web.py and shadowbox.js, as well as
postgresql.
In one of my templates i have following code:
$code:
stores = db.select('stores',
what='address,maplink,photo',
where='active=TRUE',
order='position ASC')
<table class="stores">
$for store in stores:
<tr>
$if store.photo is not False:
<td class="pic"><a href="static/img/fullsize/
$store.photo" rel="shadowbox"><img src="static/img/thumbnails/
$store.photo" alt=""/></a></td>
$else:
<td class="pic"><img src="static/img/
rect2163.png" alt=""/></td>
<td class="store">blah
<p class="address">blah</p>
<a href="/a">blah</a>
</td>
</tr>
</table>
It works well, producing table with several lines and proper links,
but when i click on any link (invoking shadowbox) I can see strange
things in my web.py's log:
0.0 (1): SELECT address,maplink,photo FROM stores WHERE active=TRUE
ORDER BY position ASC
195.62.63.122:52556 - - [03/Apr/2010 22:40:41] "HTTP/1.1 GET /img/
loading.gif" - 200 OK
0.0 (1): SELECT address,maplink,photo FROM stores WHERE active=TRUE
ORDER BY position ASC
195.62.63.122:52325 - - [03/Apr/2010 22:40:41] "HTTP/1.1 GET /img/
close.png" - 200 OK
0.0 (1): SELECT address,maplink,photo FROM stores WHERE active=TRUE
ORDER BY position ASC
195.62.63.122:59952 - - [03/Apr/2010 22:40:41] "HTTP/1.1 GET /img/
next.png" - 200 OK
0.0 (1): SELECT address,maplink,photo FROM stores WHERE active=TRUE
ORDER BY position ASC
195.62.63.122:61024 - - [03/Apr/2010 22:40:41] "HTTP/1.1 GET /img/
play.png" - 200 OK
0.0 (1): SELECT address,maplink,photo FROM stores WHERE active=TRUE
ORDER BY position ASC
195.62.63.122:58449 - - [03/Apr/2010 22:40:41] "HTTP/1.1 GET /img/
pause.png" - 200 OK
0.0 (1): SELECT address,maplink,photo FROM stores WHERE active=TRUE
ORDER BY position ASC
195.62.63.122:52601 - - [03/Apr/2010 22:40:41] "HTTP/1.1 GET /img/
previous.png" - 200 OK
195.62.63.122:64784 - - [03/Apr/2010 22:40:41] "HTTP/1.1 GET /static/
img/fullsize/IMG_0449.JPG" - 200
It seems like it queries db every time shadowbox'es image has been
requested. When I click a link second time, it doesn't do any queries
(== images are in cache)
I don't query db in any other place either.
Thanks in advance,
Max.
--
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en.