Yeah, Dave, it’s a local copy of the metadata. I don’t actually save the photos themselves (although I easily could), simply for storage/bandwidth reasons (instead, I just grab the URLs and display the photos straight from Flickr).
The way I’ve set it up is read-only. I have a script that runs on a cron job every 10 minutes, checking with Flickr (using its API, of course) to see if any of the metadata for any of my photos have changed. If so, it re-imports the metadata for the changed photo(s). So, for example, within 10 minutes of you commenting on this photo, my local copy should have incremented from “2” to “3” on the “Comment Count” field (which you don’t see here, but does exist).
Since Flickr does expose a writing API, it would be pretty painless to too two-way support to it — I just haven’t really needed it. Any Django object can have a custom save method, so the way to do it would be to inject the Flickr write API code into the save method — that way, any time the local copy was saved, it would send the changes to Flickr.
I guess I just don’t feel like I have a need for that — but I imagine one could come up with some cool uses. :)
FWIW, this is basically the same process I use for Ma.gnolia links and a few other services, as well (cocomment, last.fm, etc.).
Jeff, that looks awesome. A perfect way to extend flickr onto your site, without calling to the flickr API every request.
Im anxious to see the next release of your site dangit, hurry up!
very nice! i’ve been writing my own scripts to import delicious links and flickr photos into my django cms. i wish i had a jellyroll… will this become a part of django in the future? another contrib app?
001 // wilsonminer // 10.30.2006 // 4:17 PM
Looks like I’ll be inspecting your directory on the server in a few months when I get down to updating my install!002 // Jeff Croft // 10.30.2006 // 4:40 PM
Pirate!003 // mezzoblue // 10.30.2006 // 5:35 PM
Okay, so if I’m getting this… it’s a local cache of your Flickr metadata? Does it work both ways, or is it read-only?004 // Jeff Croft // 10.30.2006 // 6:15 PM
Yeah, Dave, it’s a local copy of the metadata. I don’t actually save the photos themselves (although I easily could), simply for storage/bandwidth reasons (instead, I just grab the URLs and display the photos straight from Flickr). The way I’ve set it up is read-only. I have a script that runs on a cron job every 10 minutes, checking with Flickr (using its API, of course) to see if any of the metadata for any of my photos have changed. If so, it re-imports the metadata for the changed photo(s). So, for example, within 10 minutes of you commenting on this photo, my local copy should have incremented from “2” to “3” on the “Comment Count” field (which you don’t see here, but does exist). Since Flickr does expose a writing API, it would be pretty painless to too two-way support to it — I just haven’t really needed it. Any Django object can have a custom save method, so the way to do it would be to inject the Flickr write API code into the save method — that way, any time the local copy was saved, it would send the changes to Flickr. I guess I just don’t feel like I have a need for that — but I imagine one could come up with some cool uses. :) FWIW, this is basically the same process I use for Ma.gnolia links and a few other services, as well (cocomment, last.fm, etc.).005 // nateklaiber // 10.31.2006 // 8:15 AM
Jeff, that looks awesome. A perfect way to extend flickr onto your site, without calling to the flickr API every request. Im anxious to see the next release of your site dangit, hurry up!006 // bureau de mischief // 10.31.2006 // 11:28 AM
very nice! i’ve been writing my own scripts to import delicious links and flickr photos into my django cms. i wish i had a jellyroll… will this become a part of django in the future? another contrib app?