Display arbitrary models
Template tag for displaying a list of arbitrary models. Useful for life-stream kind of pages that display blog entries, links, photos etc ordered by date. [Example](http://bjornkri.com) **Usage:** something like: {% for object in object_list %} {% display_excerpt object %} {% endfor %} Will look for *app/model_excerpt.html* by default, and fall back on a generic *display_excerpt.html*, or returns the object's string representation as a last fallback. *display_excerpt.html* might look something like: <a href="{{ object.get_absolute_url }}">{{ object }}</a> Any model you throw at it should have a *get_absolute_url* and a string representation of some sort, so this gives you the bare minimum of a title and a link to a detail page. *display_excerpt* takes an optional argument to set the template suffix. This might be handy for generating different formatting for feeds, for instance: {% for object in object_list %} {% display_excerpt object "feed" %} {% endfor %} This will look for app/model_feed.html to render the object. Got lots of help from mattmcc on #django for this one, thanks!
- display
- excerpt
- lifestream