开发者

Synchronizing Flickr With Django

I am trying to synchronize flickr with django. I am using django-syncr app. But i stacked in somewhere.开发者_JAVA百科

Database syncdb is ok. But how do we sync the images? Where do we write below code.

from syncr.app.flickr import FlickrSyncr

f = FlickrSyncr(API_KEY, API_SECRET)

f.syncRecentPhotos('username', days=7)

f.syncPublicFavorites('username')

http://code.google.com/p/django-syncr/


If you wanted to manually synchronize photos, you could add that code to a view that could redirect to a template that might show the updated photos.

In my opinion, a better solution would be automated background synchronization. You could either write a Python script and have it run through a cron job, or use a task management solution like celery.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜