Login

Tag "delicious"

Snippet List

Deli.cio.us rss template tag

This snipped get the latest rss links from delicious from a DELICIOUS_USER that you have to define in your settings. I use this snippet in the [trespams code blog](http://trespams.com) to inform the visitor about the last links I have bookmarked. This is a modified version of [snipped 819](http://www.djangosnippets.org/snippets/819/) to allow using any variable in the template to obtain the results. It also added a 6 hours caché for the rss.

  • delicious
Read More

Delicious Tag

Just add it in templatetags/delicious.py In your template: <h3>Del.icio.us</h3> <ul class="list"> {% load delicious %} {% load_delicious_links %} {% for link in delicious_links %} <li><a href="{{link.link}}">{{link.title|safe}}</a></li> {% endfor %} </ul>

  • tag
  • delicious
Read More

Cached Del.icio.us API Calls

This will save your del.icio.us bookmarks in your own database with a Bookmarks model. It depends on several things: 1. `DELICIOUS_USER` and `DELICIOUS_PASS` defined in settings.py 2. [pydelicious](http://code.google.com/p/pydelicious/) installed 3. Any view that uses del.icio.us should call the delicious() function, to update the database. 4. The [cache_function](http://www.djangosnippets.org/snippets/109/) decorator must be available. (I have it in a decorators.py file in my app; if you move it, you need to update the import) 5. The [django-tagging](http://code.google.com/p/django-tagging/) app, although it could be modified to not need this rather easily. Other than all those dependencies, it's actually rather simple. It will call del.icio.us for the 5 most recent posts, and create them if they're not already in the database. Otherwise, it'll check for updates, and change as appropriate. It won't return anything, as it updates the models themselves.

  • cache
  • delicious
  • pydelicious
  • api
  • bookmarks
Read More

3 snippets posted so far.